Merge ~athos-ribeiro/ubuntu/+source/postgresql-13:MRE-impish-13.7 into ubuntu/+source/postgresql-13:ubuntu/impish-devel

Proposed by Athos Ribeiro
Status: Merged
Merge reported by: Athos Ribeiro
Merged at revision: 320c92c39daa6ec64d27d59125886ab4e55f5dad
Proposed branch: ~athos-ribeiro/ubuntu/+source/postgresql-13:MRE-impish-13.7
Merge into: ubuntu/+source/postgresql-13:ubuntu/impish-devel
Diff against target: 165243 lines (+46258/-41363)
1655 files modified
.gitrevision (+1/-1)
INSTALL (+10/-19)
config/c-compiler.m4 (+22/-0)
configure (+64/-21)
configure.in (+8/-2)
contrib/amcheck/expected/check_btree.out (+23/-0)
contrib/amcheck/sql/check_btree.sql (+21/-0)
contrib/amcheck/t/002_cic.pl (+2/-1)
contrib/amcheck/t/003_cic_2pc.pl (+10/-7)
contrib/amcheck/verify_nbtree.c (+27/-0)
contrib/bloom/t/001_wal.pl (+12/-1)
contrib/cube/cubeparse.c (+362/-490)
contrib/ltree/ltree.h (+5/-3)
contrib/ltree/ltree_gist.c (+6/-6)
contrib/pageinspect/brinfuncs.c (+53/-23)
contrib/pageinspect/btreefuncs.c (+33/-15)
contrib/pageinspect/expected/brin.out (+39/-0)
contrib/pageinspect/expected/btree.out (+37/-2)
contrib/pageinspect/expected/gin.out (+33/-0)
contrib/pageinspect/expected/hash.out (+39/-0)
contrib/pageinspect/expected/page.out (+31/-0)
contrib/pageinspect/fsmfuncs.c (+7/-1)
contrib/pageinspect/ginfuncs.c (+31/-3)
contrib/pageinspect/hashfuncs.c (+11/-6)
contrib/pageinspect/rawpage.c (+5/-25)
contrib/pageinspect/sql/brin.sql (+19/-0)
contrib/pageinspect/sql/btree.sql (+29/-2)
contrib/pageinspect/sql/gin.sql (+20/-0)
contrib/pageinspect/sql/hash.sql (+26/-0)
contrib/pageinspect/sql/page.sql (+15/-0)
contrib/pgcrypto/px.c (+1/-1)
contrib/postgres_fdw/deparse.c (+119/-47)
contrib/postgres_fdw/expected/postgres_fdw.out (+23/-0)
contrib/postgres_fdw/postgres_fdw.c (+75/-28)
contrib/postgres_fdw/postgres_fdw.h (+9/-4)
contrib/postgres_fdw/sql/postgres_fdw.sql (+8/-0)
contrib/seg/segparse.c (+359/-490)
contrib/test_decoding/expected/toast.out (+1/-1)
debian/changelog (+33/-0)
doc/src/sgml/event-trigger.sgml (+16/-0)
doc/src/sgml/html/acronyms.html (+3/-3)
doc/src/sgml/html/admin.html (+2/-2)
doc/src/sgml/html/adminpack.html (+2/-2)
doc/src/sgml/html/amcheck.html (+2/-2)
doc/src/sgml/html/app-clusterdb.html (+2/-2)
doc/src/sgml/html/app-createdb.html (+2/-2)
doc/src/sgml/html/app-createuser.html (+2/-2)
doc/src/sgml/html/app-dropdb.html (+2/-2)
doc/src/sgml/html/app-dropuser.html (+2/-2)
doc/src/sgml/html/app-ecpg.html (+2/-2)
doc/src/sgml/html/app-initdb.html (+2/-2)
doc/src/sgml/html/app-pg-ctl.html (+2/-2)
doc/src/sgml/html/app-pg-dumpall.html (+2/-2)
doc/src/sgml/html/app-pg-isready.html (+2/-2)
doc/src/sgml/html/app-pgbasebackup.html (+2/-2)
doc/src/sgml/html/app-pgchecksums.html (+2/-2)
doc/src/sgml/html/app-pgconfig.html (+2/-2)
doc/src/sgml/html/app-pgcontroldata.html (+2/-2)
doc/src/sgml/html/app-pgdump.html (+2/-2)
doc/src/sgml/html/app-pgreceivewal.html (+2/-2)
doc/src/sgml/html/app-pgreceivexlog.html (+3/-3)
doc/src/sgml/html/app-pgrecvlogical.html (+2/-2)
doc/src/sgml/html/app-pgresetwal.html (+2/-2)
doc/src/sgml/html/app-pgresetxlog.html (+3/-3)
doc/src/sgml/html/app-pgrestore.html (+2/-2)
doc/src/sgml/html/app-pgrewind.html (+4/-4)
doc/src/sgml/html/app-pgverifybackup.html (+2/-2)
doc/src/sgml/html/app-postgres.html (+2/-2)
doc/src/sgml/html/app-postmaster.html (+2/-2)
doc/src/sgml/html/app-psql.html (+3/-3)
doc/src/sgml/html/app-reindexdb.html (+2/-2)
doc/src/sgml/html/app-vacuumdb.html (+2/-2)
doc/src/sgml/html/appendix-obsolete.html (+2/-2)
doc/src/sgml/html/appendixes.html (+1/-1)
doc/src/sgml/html/applevel-consistency.html (+2/-2)
doc/src/sgml/html/arrays.html (+2/-2)
doc/src/sgml/html/auth-bsd.html (+2/-2)
doc/src/sgml/html/auth-cert.html (+2/-2)
doc/src/sgml/html/auth-delay.html (+2/-2)
doc/src/sgml/html/auth-ident.html (+2/-2)
doc/src/sgml/html/auth-ldap.html (+2/-2)
doc/src/sgml/html/auth-methods.html (+2/-2)
doc/src/sgml/html/auth-pam.html (+2/-2)
doc/src/sgml/html/auth-password.html (+2/-2)
doc/src/sgml/html/auth-peer.html (+2/-2)
doc/src/sgml/html/auth-pg-hba-conf.html (+2/-2)
doc/src/sgml/html/auth-radius.html (+2/-2)
doc/src/sgml/html/auth-trust.html (+2/-2)
doc/src/sgml/html/auth-username-maps.html (+2/-2)
doc/src/sgml/html/auto-explain.html (+2/-2)
doc/src/sgml/html/backup-dump.html (+2/-2)
doc/src/sgml/html/backup-file.html (+2/-2)
doc/src/sgml/html/backup-manifest-files.html (+2/-2)
doc/src/sgml/html/backup-manifest-format.html (+2/-2)
doc/src/sgml/html/backup-manifest-toplevel.html (+2/-2)
doc/src/sgml/html/backup-manifest-wal-ranges.html (+2/-2)
doc/src/sgml/html/backup.html (+2/-2)
doc/src/sgml/html/bgworker.html (+2/-2)
doc/src/sgml/html/biblio.html (+2/-2)
doc/src/sgml/html/bki-commands.html (+2/-2)
doc/src/sgml/html/bki-example.html (+2/-2)
doc/src/sgml/html/bki-format.html (+2/-2)
doc/src/sgml/html/bki-structure.html (+2/-2)
doc/src/sgml/html/bki.html (+2/-2)
doc/src/sgml/html/bloom.html (+2/-2)
doc/src/sgml/html/bookindex.html (+12/-12)
doc/src/sgml/html/brin-builtin-opclasses.html (+2/-2)
doc/src/sgml/html/brin-extensibility.html (+2/-2)
doc/src/sgml/html/brin-intro.html (+2/-2)
doc/src/sgml/html/brin.html (+1/-1)
doc/src/sgml/html/btree-behavior.html (+2/-2)
doc/src/sgml/html/btree-gin.html (+2/-2)
doc/src/sgml/html/btree-gist.html (+2/-2)
doc/src/sgml/html/btree-implementation.html (+2/-2)
doc/src/sgml/html/btree-intro.html (+2/-2)
doc/src/sgml/html/btree-support-funcs.html (+2/-2)
doc/src/sgml/html/btree.html (+1/-1)
doc/src/sgml/html/bug-reporting.html (+3/-3)
doc/src/sgml/html/catalog-pg-aggregate.html (+2/-2)
doc/src/sgml/html/catalog-pg-am.html (+2/-2)
doc/src/sgml/html/catalog-pg-amop.html (+2/-2)
doc/src/sgml/html/catalog-pg-amproc.html (+2/-2)
doc/src/sgml/html/catalog-pg-attrdef.html (+2/-2)
doc/src/sgml/html/catalog-pg-attribute.html (+2/-2)
doc/src/sgml/html/catalog-pg-auth-members.html (+2/-2)
doc/src/sgml/html/catalog-pg-authid.html (+2/-2)
doc/src/sgml/html/catalog-pg-cast.html (+2/-2)
doc/src/sgml/html/catalog-pg-class.html (+2/-2)
doc/src/sgml/html/catalog-pg-collation.html (+2/-2)
doc/src/sgml/html/catalog-pg-constraint.html (+2/-2)
doc/src/sgml/html/catalog-pg-conversion.html (+2/-2)
doc/src/sgml/html/catalog-pg-database.html (+2/-2)
doc/src/sgml/html/catalog-pg-db-role-setting.html (+2/-2)
doc/src/sgml/html/catalog-pg-default-acl.html (+2/-2)
doc/src/sgml/html/catalog-pg-depend.html (+2/-2)
doc/src/sgml/html/catalog-pg-description.html (+2/-2)
doc/src/sgml/html/catalog-pg-enum.html (+2/-2)
doc/src/sgml/html/catalog-pg-event-trigger.html (+2/-2)
doc/src/sgml/html/catalog-pg-extension.html (+2/-2)
doc/src/sgml/html/catalog-pg-foreign-data-wrapper.html (+2/-2)
doc/src/sgml/html/catalog-pg-foreign-server.html (+2/-2)
doc/src/sgml/html/catalog-pg-foreign-table.html (+2/-2)
doc/src/sgml/html/catalog-pg-index.html (+2/-2)
doc/src/sgml/html/catalog-pg-inherits.html (+2/-2)
doc/src/sgml/html/catalog-pg-init-privs.html (+2/-2)
doc/src/sgml/html/catalog-pg-language.html (+2/-2)
doc/src/sgml/html/catalog-pg-largeobject-metadata.html (+2/-2)
doc/src/sgml/html/catalog-pg-largeobject.html (+2/-2)
doc/src/sgml/html/catalog-pg-namespace.html (+2/-2)
doc/src/sgml/html/catalog-pg-opclass.html (+2/-2)
doc/src/sgml/html/catalog-pg-operator.html (+2/-2)
doc/src/sgml/html/catalog-pg-opfamily.html (+2/-2)
doc/src/sgml/html/catalog-pg-partitioned-table.html (+2/-2)
doc/src/sgml/html/catalog-pg-policy.html (+2/-2)
doc/src/sgml/html/catalog-pg-proc.html (+2/-2)
doc/src/sgml/html/catalog-pg-publication-rel.html (+2/-2)
doc/src/sgml/html/catalog-pg-publication.html (+2/-2)
doc/src/sgml/html/catalog-pg-range.html (+2/-2)
doc/src/sgml/html/catalog-pg-replication-origin.html (+2/-2)
doc/src/sgml/html/catalog-pg-rewrite.html (+2/-2)
doc/src/sgml/html/catalog-pg-seclabel.html (+2/-2)
doc/src/sgml/html/catalog-pg-sequence.html (+2/-2)
doc/src/sgml/html/catalog-pg-shdepend.html (+2/-2)
doc/src/sgml/html/catalog-pg-shdescription.html (+2/-2)
doc/src/sgml/html/catalog-pg-shseclabel.html (+2/-2)
doc/src/sgml/html/catalog-pg-statistic-ext-data.html (+2/-2)
doc/src/sgml/html/catalog-pg-statistic-ext.html (+2/-2)
doc/src/sgml/html/catalog-pg-statistic.html (+2/-2)
doc/src/sgml/html/catalog-pg-subscription-rel.html (+2/-2)
doc/src/sgml/html/catalog-pg-subscription.html (+2/-2)
doc/src/sgml/html/catalog-pg-tablespace.html (+2/-2)
doc/src/sgml/html/catalog-pg-transform.html (+2/-2)
doc/src/sgml/html/catalog-pg-trigger.html (+2/-2)
doc/src/sgml/html/catalog-pg-ts-config-map.html (+2/-2)
doc/src/sgml/html/catalog-pg-ts-config.html (+2/-2)
doc/src/sgml/html/catalog-pg-ts-dict.html (+2/-2)
doc/src/sgml/html/catalog-pg-ts-parser.html (+2/-2)
doc/src/sgml/html/catalog-pg-ts-template.html (+2/-2)
doc/src/sgml/html/catalog-pg-type.html (+2/-2)
doc/src/sgml/html/catalog-pg-user-mapping.html (+2/-2)
doc/src/sgml/html/catalogs-overview.html (+2/-2)
doc/src/sgml/html/catalogs.html (+2/-2)
doc/src/sgml/html/charset.html (+2/-2)
doc/src/sgml/html/citext.html (+2/-2)
doc/src/sgml/html/client-authentication-problems.html (+2/-2)
doc/src/sgml/html/client-authentication.html (+2/-2)
doc/src/sgml/html/client-interfaces.html (+2/-2)
doc/src/sgml/html/collation.html (+2/-2)
doc/src/sgml/html/color-when.html (+2/-2)
doc/src/sgml/html/color-which.html (+2/-2)
doc/src/sgml/html/color.html (+2/-2)
doc/src/sgml/html/config-setting.html (+2/-2)
doc/src/sgml/html/connect-estab.html (+2/-2)
doc/src/sgml/html/continuous-archiving.html (+2/-2)
doc/src/sgml/html/contrib-dblink-build-sql-delete.html (+2/-2)
doc/src/sgml/html/contrib-dblink-build-sql-insert.html (+2/-2)
doc/src/sgml/html/contrib-dblink-build-sql-update.html (+2/-2)
doc/src/sgml/html/contrib-dblink-cancel-query.html (+2/-2)
doc/src/sgml/html/contrib-dblink-close.html (+2/-2)
doc/src/sgml/html/contrib-dblink-connect-u.html (+2/-2)
doc/src/sgml/html/contrib-dblink-connect.html (+2/-2)
doc/src/sgml/html/contrib-dblink-disconnect.html (+2/-2)
doc/src/sgml/html/contrib-dblink-error-message.html (+2/-2)
doc/src/sgml/html/contrib-dblink-exec.html (+2/-2)
doc/src/sgml/html/contrib-dblink-fetch.html (+2/-2)
doc/src/sgml/html/contrib-dblink-function.html (+2/-2)
doc/src/sgml/html/contrib-dblink-get-connections.html (+2/-2)
doc/src/sgml/html/contrib-dblink-get-notify.html (+2/-2)
doc/src/sgml/html/contrib-dblink-get-pkey.html (+2/-2)
doc/src/sgml/html/contrib-dblink-get-result.html (+2/-2)
doc/src/sgml/html/contrib-dblink-is-busy.html (+2/-2)
doc/src/sgml/html/contrib-dblink-open.html (+2/-2)
doc/src/sgml/html/contrib-dblink-send-query.html (+2/-2)
doc/src/sgml/html/contrib-prog-client.html (+2/-2)
doc/src/sgml/html/contrib-prog-server.html (+2/-2)
doc/src/sgml/html/contrib-prog.html (+2/-2)
doc/src/sgml/html/contrib-spi.html (+2/-2)
doc/src/sgml/html/contrib.html (+2/-2)
doc/src/sgml/html/creating-cluster.html (+2/-2)
doc/src/sgml/html/cube.html (+2/-2)
doc/src/sgml/html/custom-scan-execution.html (+2/-2)
doc/src/sgml/html/custom-scan-path.html (+2/-2)
doc/src/sgml/html/custom-scan-plan.html (+2/-2)
doc/src/sgml/html/custom-scan.html (+2/-2)
doc/src/sgml/html/database-roles.html (+2/-2)
doc/src/sgml/html/datatype-binary.html (+2/-2)
doc/src/sgml/html/datatype-bit.html (+2/-2)
doc/src/sgml/html/datatype-boolean.html (+2/-2)
doc/src/sgml/html/datatype-character.html (+2/-2)
doc/src/sgml/html/datatype-datetime.html (+2/-2)
doc/src/sgml/html/datatype-enum.html (+2/-2)
doc/src/sgml/html/datatype-geometric.html (+2/-2)
doc/src/sgml/html/datatype-json.html (+2/-2)
doc/src/sgml/html/datatype-money.html (+2/-2)
doc/src/sgml/html/datatype-net-types.html (+2/-2)
doc/src/sgml/html/datatype-numeric.html (+2/-2)
doc/src/sgml/html/datatype-oid.html (+2/-2)
doc/src/sgml/html/datatype-pg-lsn.html (+2/-2)
doc/src/sgml/html/datatype-pseudo.html (+2/-2)
doc/src/sgml/html/datatype-textsearch.html (+2/-2)
doc/src/sgml/html/datatype-uuid.html (+2/-2)
doc/src/sgml/html/datatype-xml.html (+2/-2)
doc/src/sgml/html/datatype.html (+2/-2)
doc/src/sgml/html/datetime-appendix.html (+2/-2)
doc/src/sgml/html/datetime-config-files.html (+2/-2)
doc/src/sgml/html/datetime-input-rules.html (+2/-2)
doc/src/sgml/html/datetime-invalid-input.html (+2/-2)
doc/src/sgml/html/datetime-julian-dates.html (+2/-2)
doc/src/sgml/html/datetime-keywords.html (+2/-2)
doc/src/sgml/html/datetime-posix-timezone-specs.html (+2/-2)
doc/src/sgml/html/datetime-units-history.html (+2/-2)
doc/src/sgml/html/dblink.html (+2/-2)
doc/src/sgml/html/ddl-alter.html (+2/-2)
doc/src/sgml/html/ddl-basics.html (+2/-2)
doc/src/sgml/html/ddl-constraints.html (+2/-2)
doc/src/sgml/html/ddl-default.html (+2/-2)
doc/src/sgml/html/ddl-depend.html (+2/-2)
doc/src/sgml/html/ddl-foreign-data.html (+2/-2)
doc/src/sgml/html/ddl-generated-columns.html (+2/-2)
doc/src/sgml/html/ddl-inherit.html (+2/-2)
doc/src/sgml/html/ddl-others.html (+2/-2)
doc/src/sgml/html/ddl-partitioning.html (+2/-2)
doc/src/sgml/html/ddl-priv.html (+2/-2)
doc/src/sgml/html/ddl-rowsecurity.html (+2/-2)
doc/src/sgml/html/ddl-schemas.html (+2/-2)
doc/src/sgml/html/ddl-system-columns.html (+2/-2)
doc/src/sgml/html/ddl.html (+2/-2)
doc/src/sgml/html/default-roles.html (+2/-2)
doc/src/sgml/html/dict-int.html (+2/-2)
doc/src/sgml/html/dict-xsyn.html (+2/-2)
doc/src/sgml/html/different-replication-solutions.html (+2/-2)
doc/src/sgml/html/disk-full.html (+2/-2)
doc/src/sgml/html/disk-usage.html (+2/-2)
doc/src/sgml/html/diskusage.html (+2/-2)
doc/src/sgml/html/dml-delete.html (+2/-2)
doc/src/sgml/html/dml-insert.html (+2/-2)
doc/src/sgml/html/dml-returning.html (+2/-2)
doc/src/sgml/html/dml-update.html (+2/-2)
doc/src/sgml/html/dml.html (+2/-2)
doc/src/sgml/html/docguide-authoring.html (+2/-2)
doc/src/sgml/html/docguide-build.html (+2/-2)
doc/src/sgml/html/docguide-docbook.html (+2/-2)
doc/src/sgml/html/docguide-style.html (+2/-2)
doc/src/sgml/html/docguide-toolsets.html (+2/-2)
doc/src/sgml/html/docguide.html (+2/-2)
doc/src/sgml/html/domains.html (+2/-2)
doc/src/sgml/html/dynamic-trace.html (+2/-2)
doc/src/sgml/html/earthdistance.html (+2/-2)
doc/src/sgml/html/ecpg-commands.html (+2/-2)
doc/src/sgml/html/ecpg-concept.html (+2/-2)
doc/src/sgml/html/ecpg-connect.html (+2/-2)
doc/src/sgml/html/ecpg-cpp.html (+2/-2)
doc/src/sgml/html/ecpg-descriptors.html (+2/-2)
doc/src/sgml/html/ecpg-develop.html (+2/-2)
doc/src/sgml/html/ecpg-dynamic.html (+2/-2)
doc/src/sgml/html/ecpg-errors.html (+2/-2)
doc/src/sgml/html/ecpg-informix-compat.html (+2/-2)
doc/src/sgml/html/ecpg-library.html (+2/-2)
doc/src/sgml/html/ecpg-lo.html (+2/-2)
doc/src/sgml/html/ecpg-pgtypes.html (+2/-2)
doc/src/sgml/html/ecpg-preproc.html (+2/-2)
doc/src/sgml/html/ecpg-process.html (+2/-2)
doc/src/sgml/html/ecpg-sql-allocate-descriptor.html (+2/-2)
doc/src/sgml/html/ecpg-sql-commands.html (+2/-2)
doc/src/sgml/html/ecpg-sql-connect.html (+2/-2)
doc/src/sgml/html/ecpg-sql-deallocate-descriptor.html (+2/-2)
doc/src/sgml/html/ecpg-sql-declare.html (+2/-2)
doc/src/sgml/html/ecpg-sql-describe.html (+2/-2)
doc/src/sgml/html/ecpg-sql-disconnect.html (+2/-2)
doc/src/sgml/html/ecpg-sql-execute-immediate.html (+2/-2)
doc/src/sgml/html/ecpg-sql-get-descriptor.html (+2/-2)
doc/src/sgml/html/ecpg-sql-open.html (+2/-2)
doc/src/sgml/html/ecpg-sql-prepare.html (+2/-2)
doc/src/sgml/html/ecpg-sql-set-autocommit.html (+2/-2)
doc/src/sgml/html/ecpg-sql-set-connection.html (+2/-2)
doc/src/sgml/html/ecpg-sql-set-descriptor.html (+2/-2)
doc/src/sgml/html/ecpg-sql-type.html (+2/-2)
doc/src/sgml/html/ecpg-sql-var.html (+2/-2)
doc/src/sgml/html/ecpg-sql-whenever.html (+2/-2)
doc/src/sgml/html/ecpg-variables.html (+2/-2)
doc/src/sgml/html/ecpg.html (+2/-2)
doc/src/sgml/html/encryption-options.html (+2/-2)
doc/src/sgml/html/errcodes-appendix.html (+3/-3)
doc/src/sgml/html/error-message-reporting.html (+2/-2)
doc/src/sgml/html/error-style-guide.html (+2/-2)
doc/src/sgml/html/event-log-registration.html (+2/-2)
doc/src/sgml/html/event-trigger-definition.html (+2/-2)
doc/src/sgml/html/event-trigger-example.html (+2/-2)
doc/src/sgml/html/event-trigger-interface.html (+2/-2)
doc/src/sgml/html/event-trigger-matrix.html (+2/-2)
doc/src/sgml/html/event-trigger-table-rewrite-example.html (+2/-2)
doc/src/sgml/html/event-triggers.html (+2/-2)
doc/src/sgml/html/executor.html (+2/-2)
doc/src/sgml/html/explicit-joins.html (+2/-2)
doc/src/sgml/html/explicit-locking.html (+2/-2)
doc/src/sgml/html/extend-extensions.html (+2/-2)
doc/src/sgml/html/extend-how.html (+2/-2)
doc/src/sgml/html/extend-pgxs.html (+2/-2)
doc/src/sgml/html/extend-type-system.html (+2/-2)
doc/src/sgml/html/extend.html (+2/-2)
doc/src/sgml/html/external-admin-tools.html (+2/-2)
doc/src/sgml/html/external-extensions.html (+2/-2)
doc/src/sgml/html/external-interfaces.html (+2/-2)
doc/src/sgml/html/external-pl.html (+2/-2)
doc/src/sgml/html/external-projects.html (+2/-2)
doc/src/sgml/html/fdw-callbacks.html (+2/-2)
doc/src/sgml/html/fdw-functions.html (+2/-2)
doc/src/sgml/html/fdw-helpers.html (+2/-2)
doc/src/sgml/html/fdw-planning.html (+2/-2)
doc/src/sgml/html/fdw-row-locking.html (+2/-2)
doc/src/sgml/html/fdwhandler.html (+2/-2)
doc/src/sgml/html/features-sql-standard.html (+2/-2)
doc/src/sgml/html/features.html (+2/-2)
doc/src/sgml/html/file-fdw.html (+2/-2)
doc/src/sgml/html/functions-admin.html (+2/-2)
doc/src/sgml/html/functions-aggregate.html (+2/-2)
doc/src/sgml/html/functions-array.html (+2/-2)
doc/src/sgml/html/functions-binarystring.html (+2/-2)
doc/src/sgml/html/functions-bitstring.html (+2/-2)
doc/src/sgml/html/functions-comparison.html (+2/-2)
doc/src/sgml/html/functions-comparisons.html (+2/-2)
doc/src/sgml/html/functions-conditional.html (+2/-2)
doc/src/sgml/html/functions-datetime.html (+2/-2)
doc/src/sgml/html/functions-enum.html (+2/-2)
doc/src/sgml/html/functions-event-triggers.html (+2/-2)
doc/src/sgml/html/functions-formatting.html (+2/-2)
doc/src/sgml/html/functions-geometry.html (+2/-2)
doc/src/sgml/html/functions-info.html (+2/-2)
doc/src/sgml/html/functions-json.html (+2/-2)
doc/src/sgml/html/functions-logical.html (+2/-2)
doc/src/sgml/html/functions-matching.html (+2/-2)
doc/src/sgml/html/functions-math.html (+2/-2)
doc/src/sgml/html/functions-net.html (+2/-2)
doc/src/sgml/html/functions-range.html (+2/-2)
doc/src/sgml/html/functions-sequence.html (+2/-2)
doc/src/sgml/html/functions-srf.html (+2/-2)
doc/src/sgml/html/functions-statistics.html (+2/-2)
doc/src/sgml/html/functions-string.html (+2/-2)
doc/src/sgml/html/functions-subquery.html (+2/-2)
doc/src/sgml/html/functions-textsearch.html (+2/-2)
doc/src/sgml/html/functions-trigger.html (+2/-2)
doc/src/sgml/html/functions-uuid.html (+2/-2)
doc/src/sgml/html/functions-window.html (+2/-2)
doc/src/sgml/html/functions-xml.html (+2/-2)
doc/src/sgml/html/functions.html (+2/-2)
doc/src/sgml/html/fuzzystrmatch.html (+2/-2)
doc/src/sgml/html/generic-wal.html (+2/-2)
doc/src/sgml/html/geqo-biblio.html (+2/-2)
doc/src/sgml/html/geqo-intro.html (+2/-2)
doc/src/sgml/html/geqo-intro2.html (+2/-2)
doc/src/sgml/html/geqo-pg-intro.html (+2/-2)
doc/src/sgml/html/geqo.html (+2/-2)
doc/src/sgml/html/gin-builtin-opclasses.html (+2/-2)
doc/src/sgml/html/gin-examples.html (+2/-2)
doc/src/sgml/html/gin-extensibility.html (+2/-2)
doc/src/sgml/html/gin-implementation.html (+2/-2)
doc/src/sgml/html/gin-intro.html (+2/-2)
doc/src/sgml/html/gin-limit.html (+2/-2)
doc/src/sgml/html/gin-tips.html (+2/-2)
doc/src/sgml/html/gin.html (+1/-1)
doc/src/sgml/html/gist-builtin-opclasses.html (+2/-2)
doc/src/sgml/html/gist-examples.html (+2/-2)
doc/src/sgml/html/gist-extensibility.html (+2/-2)
doc/src/sgml/html/gist-implementation.html (+2/-2)
doc/src/sgml/html/gist-intro.html (+2/-2)
doc/src/sgml/html/gist.html (+1/-1)
doc/src/sgml/html/git.html (+2/-2)
doc/src/sgml/html/glossary.html (+2/-2)
doc/src/sgml/html/gssapi-auth.html (+2/-2)
doc/src/sgml/html/gssapi-enc.html (+2/-2)
doc/src/sgml/html/hash-implementation.html (+2/-2)
doc/src/sgml/html/hash-index.html (+1/-1)
doc/src/sgml/html/hash-intro.html (+2/-2)
doc/src/sgml/html/high-availability.html (+2/-2)
doc/src/sgml/html/history.html (+2/-2)
doc/src/sgml/html/hot-standby.html (+2/-2)
doc/src/sgml/html/how-parallel-query-works.html (+2/-2)
doc/src/sgml/html/hstore.html (+2/-2)
doc/src/sgml/html/index-api.html (+2/-2)
doc/src/sgml/html/index-cost-estimation.html (+2/-2)
doc/src/sgml/html/index-functions.html (+2/-2)
doc/src/sgml/html/index-locking.html (+2/-2)
doc/src/sgml/html/index-scanning.html (+2/-2)
doc/src/sgml/html/index-unique-checks.html (+2/-2)
doc/src/sgml/html/index.html (+1/-1)
doc/src/sgml/html/indexam.html (+2/-2)
doc/src/sgml/html/indexes-bitmap-scans.html (+2/-2)
doc/src/sgml/html/indexes-collations.html (+2/-2)
doc/src/sgml/html/indexes-examine.html (+2/-2)
doc/src/sgml/html/indexes-expressional.html (+2/-2)
doc/src/sgml/html/indexes-index-only-scans.html (+2/-2)
doc/src/sgml/html/indexes-intro.html (+2/-2)
doc/src/sgml/html/indexes-multicolumn.html (+2/-2)
doc/src/sgml/html/indexes-opclass.html (+2/-2)
doc/src/sgml/html/indexes-ordering.html (+2/-2)
doc/src/sgml/html/indexes-partial.html (+2/-2)
doc/src/sgml/html/indexes-types.html (+2/-2)
doc/src/sgml/html/indexes-unique.html (+2/-2)
doc/src/sgml/html/indexes.html (+2/-2)
doc/src/sgml/html/information-schema.html (+2/-2)
doc/src/sgml/html/infoschema-administrable-role-authorizations.html (+2/-2)
doc/src/sgml/html/infoschema-applicable-roles.html (+2/-2)
doc/src/sgml/html/infoschema-attributes.html (+2/-2)
doc/src/sgml/html/infoschema-character-sets.html (+2/-2)
doc/src/sgml/html/infoschema-check-constraint-routine-usage.html (+2/-2)
doc/src/sgml/html/infoschema-check-constraints.html (+2/-2)
doc/src/sgml/html/infoschema-collation-character-set-applicab.html (+2/-2)
doc/src/sgml/html/infoschema-collations.html (+2/-2)
doc/src/sgml/html/infoschema-column-column-usage.html (+2/-2)
doc/src/sgml/html/infoschema-column-domain-usage.html (+2/-2)
doc/src/sgml/html/infoschema-column-options.html (+2/-2)
doc/src/sgml/html/infoschema-column-privileges.html (+2/-2)
doc/src/sgml/html/infoschema-column-udt-usage.html (+2/-2)
doc/src/sgml/html/infoschema-columns.html (+2/-2)
doc/src/sgml/html/infoschema-constraint-column-usage.html (+2/-2)
doc/src/sgml/html/infoschema-constraint-table-usage.html (+2/-2)
doc/src/sgml/html/infoschema-data-type-privileges.html (+2/-2)
doc/src/sgml/html/infoschema-datatypes.html (+2/-2)
doc/src/sgml/html/infoschema-domain-constraints.html (+2/-2)
doc/src/sgml/html/infoschema-domain-udt-usage.html (+2/-2)
doc/src/sgml/html/infoschema-domains.html (+2/-2)
doc/src/sgml/html/infoschema-element-types.html (+2/-2)
doc/src/sgml/html/infoschema-enabled-roles.html (+2/-2)
doc/src/sgml/html/infoschema-foreign-data-wrapper-options.html (+2/-2)
doc/src/sgml/html/infoschema-foreign-data-wrappers.html (+2/-2)
doc/src/sgml/html/infoschema-foreign-server-options.html (+2/-2)
doc/src/sgml/html/infoschema-foreign-servers.html (+2/-2)
doc/src/sgml/html/infoschema-foreign-table-options.html (+2/-2)
doc/src/sgml/html/infoschema-foreign-tables.html (+2/-2)
doc/src/sgml/html/infoschema-information-schema-catalog-name.html (+2/-2)
doc/src/sgml/html/infoschema-key-column-usage.html (+2/-2)
doc/src/sgml/html/infoschema-parameters.html (+2/-2)
doc/src/sgml/html/infoschema-referential-constraints.html (+2/-2)
doc/src/sgml/html/infoschema-role-column-grants.html (+2/-2)
doc/src/sgml/html/infoschema-role-routine-grants.html (+2/-2)
doc/src/sgml/html/infoschema-role-table-grants.html (+2/-2)
doc/src/sgml/html/infoschema-role-udt-grants.html (+2/-2)
doc/src/sgml/html/infoschema-role-usage-grants.html (+2/-2)
doc/src/sgml/html/infoschema-routine-privileges.html (+2/-2)
doc/src/sgml/html/infoschema-routines.html (+2/-2)
doc/src/sgml/html/infoschema-schema.html (+2/-2)
doc/src/sgml/html/infoschema-schemata.html (+2/-2)
doc/src/sgml/html/infoschema-sequences.html (+2/-2)
doc/src/sgml/html/infoschema-sql-features.html (+2/-2)
doc/src/sgml/html/infoschema-sql-implementation-info.html (+2/-2)
doc/src/sgml/html/infoschema-sql-parts.html (+2/-2)
doc/src/sgml/html/infoschema-sql-sizing.html (+2/-2)
doc/src/sgml/html/infoschema-table-constraints.html (+2/-2)
doc/src/sgml/html/infoschema-table-privileges.html (+2/-2)
doc/src/sgml/html/infoschema-tables.html (+2/-2)
doc/src/sgml/html/infoschema-transforms.html (+2/-2)
doc/src/sgml/html/infoschema-triggered-update-columns.html (+2/-2)
doc/src/sgml/html/infoschema-triggers.html (+2/-2)
doc/src/sgml/html/infoschema-udt-privileges.html (+2/-2)
doc/src/sgml/html/infoschema-usage-privileges.html (+2/-2)
doc/src/sgml/html/infoschema-user-defined-types.html (+2/-2)
doc/src/sgml/html/infoschema-user-mapping-options.html (+2/-2)
doc/src/sgml/html/infoschema-user-mappings.html (+2/-2)
doc/src/sgml/html/infoschema-view-column-usage.html (+2/-2)
doc/src/sgml/html/infoschema-view-routine-usage.html (+2/-2)
doc/src/sgml/html/infoschema-view-table-usage.html (+2/-2)
doc/src/sgml/html/infoschema-views.html (+2/-2)
doc/src/sgml/html/install-getsource.html (+8/-8)
doc/src/sgml/html/install-post.html (+2/-2)
doc/src/sgml/html/install-procedure.html (+2/-2)
doc/src/sgml/html/install-requirements.html (+2/-2)
doc/src/sgml/html/install-short.html (+2/-2)
doc/src/sgml/html/install-windows-full.html (+3/-3)
doc/src/sgml/html/install-windows.html (+2/-2)
doc/src/sgml/html/installation-platform-notes.html (+2/-2)
doc/src/sgml/html/installation.html (+2/-2)
doc/src/sgml/html/intagg.html (+2/-2)
doc/src/sgml/html/intarray.html (+2/-2)
doc/src/sgml/html/internals.html (+2/-2)
doc/src/sgml/html/intro-whatis.html (+2/-2)
doc/src/sgml/html/isn.html (+2/-2)
doc/src/sgml/html/jit-configuration.html (+2/-2)
doc/src/sgml/html/jit-decision.html (+2/-2)
doc/src/sgml/html/jit-extensibility.html (+2/-2)
doc/src/sgml/html/jit-reason.html (+2/-2)
doc/src/sgml/html/jit.html (+2/-2)
doc/src/sgml/html/kernel-resources.html (+2/-2)
doc/src/sgml/html/largeobjects.html (+2/-2)
doc/src/sgml/html/legalnotice.html (+1/-1)
doc/src/sgml/html/libpq-async.html (+2/-2)
doc/src/sgml/html/libpq-build.html (+2/-2)
doc/src/sgml/html/libpq-cancel.html (+2/-2)
doc/src/sgml/html/libpq-connect.html (+2/-2)
doc/src/sgml/html/libpq-control.html (+2/-2)
doc/src/sgml/html/libpq-copy.html (+2/-2)
doc/src/sgml/html/libpq-envars.html (+2/-2)
doc/src/sgml/html/libpq-events.html (+2/-2)
doc/src/sgml/html/libpq-example.html (+2/-2)
doc/src/sgml/html/libpq-exec.html (+2/-2)
doc/src/sgml/html/libpq-fastpath.html (+2/-2)
doc/src/sgml/html/libpq-ldap.html (+2/-2)
doc/src/sgml/html/libpq-misc.html (+2/-2)
doc/src/sgml/html/libpq-notice-processing.html (+2/-2)
doc/src/sgml/html/libpq-notify.html (+2/-2)
doc/src/sgml/html/libpq-pgpass.html (+2/-2)
doc/src/sgml/html/libpq-pgservice.html (+2/-2)
doc/src/sgml/html/libpq-single-row-mode.html (+2/-2)
doc/src/sgml/html/libpq-ssl.html (+19/-9)
doc/src/sgml/html/libpq-status.html (+2/-2)
doc/src/sgml/html/libpq-threading.html (+2/-2)
doc/src/sgml/html/libpq.html (+2/-2)
doc/src/sgml/html/limits.html (+2/-2)
doc/src/sgml/html/lo-examplesect.html (+2/-2)
doc/src/sgml/html/lo-funcs.html (+2/-2)
doc/src/sgml/html/lo-implementation.html (+2/-2)
doc/src/sgml/html/lo-interfaces.html (+2/-2)
doc/src/sgml/html/lo-intro.html (+2/-2)
doc/src/sgml/html/lo.html (+2/-2)
doc/src/sgml/html/locale.html (+2/-2)
doc/src/sgml/html/locking-indexes.html (+2/-2)
doc/src/sgml/html/log-shipping-alternative.html (+2/-2)
doc/src/sgml/html/logfile-maintenance.html (+2/-2)
doc/src/sgml/html/logical-replication-architecture.html (+2/-2)
doc/src/sgml/html/logical-replication-config.html (+2/-2)
doc/src/sgml/html/logical-replication-conflicts.html (+2/-2)
doc/src/sgml/html/logical-replication-monitoring.html (+2/-2)
doc/src/sgml/html/logical-replication-publication.html (+2/-2)
doc/src/sgml/html/logical-replication-quick-setup.html (+2/-2)
doc/src/sgml/html/logical-replication-restrictions.html (+2/-2)
doc/src/sgml/html/logical-replication-security.html (+2/-2)
doc/src/sgml/html/logical-replication-subscription.html (+2/-2)
doc/src/sgml/html/logical-replication.html (+2/-2)
doc/src/sgml/html/logicaldecoding-catalogs.html (+2/-2)
doc/src/sgml/html/logicaldecoding-example.html (+2/-2)
doc/src/sgml/html/logicaldecoding-explanation.html (+2/-2)
doc/src/sgml/html/logicaldecoding-output-plugin.html (+2/-2)
doc/src/sgml/html/logicaldecoding-sql.html (+2/-2)
doc/src/sgml/html/logicaldecoding-synchronous.html (+2/-2)
doc/src/sgml/html/logicaldecoding-walsender.html (+2/-2)
doc/src/sgml/html/logicaldecoding-writer.html (+2/-2)
doc/src/sgml/html/logicaldecoding.html (+2/-2)
doc/src/sgml/html/ltree.html (+2/-2)
doc/src/sgml/html/maintenance.html (+2/-2)
doc/src/sgml/html/manage-ag-config.html (+2/-2)
doc/src/sgml/html/manage-ag-createdb.html (+2/-2)
doc/src/sgml/html/manage-ag-dropdb.html (+2/-2)
doc/src/sgml/html/manage-ag-overview.html (+2/-2)
doc/src/sgml/html/manage-ag-tablespaces.html (+2/-2)
doc/src/sgml/html/manage-ag-templatedbs.html (+2/-2)
doc/src/sgml/html/managing-databases.html (+2/-2)
doc/src/sgml/html/monitoring-locks.html (+2/-2)
doc/src/sgml/html/monitoring-ps.html (+2/-2)
doc/src/sgml/html/monitoring-stats.html (+4/-3)
doc/src/sgml/html/monitoring.html (+2/-2)
doc/src/sgml/html/multibyte.html (+2/-2)
doc/src/sgml/html/multivariate-statistics-examples.html (+2/-2)
doc/src/sgml/html/mvcc-caveats.html (+2/-2)
doc/src/sgml/html/mvcc-intro.html (+2/-2)
doc/src/sgml/html/mvcc.html (+2/-2)
doc/src/sgml/html/nls-programmer.html (+2/-2)
doc/src/sgml/html/nls-translator.html (+2/-2)
doc/src/sgml/html/nls.html (+1/-1)
doc/src/sgml/html/non-durability.html (+2/-2)
doc/src/sgml/html/notation.html (+2/-2)
doc/src/sgml/html/oid2name.html (+2/-2)
doc/src/sgml/html/overview.html (+2/-2)
doc/src/sgml/html/pageinspect.html (+2/-2)
doc/src/sgml/html/parallel-plans.html (+2/-2)
doc/src/sgml/html/parallel-query.html (+2/-2)
doc/src/sgml/html/parallel-safety.html (+2/-2)
doc/src/sgml/html/parser-stage.html (+2/-2)
doc/src/sgml/html/passwordcheck.html (+2/-2)
doc/src/sgml/html/performance-tips.html (+2/-2)
doc/src/sgml/html/perm-functions.html (+2/-2)
doc/src/sgml/html/pgarchivecleanup.html (+2/-2)
doc/src/sgml/html/pgbench.html (+2/-2)
doc/src/sgml/html/pgbuffercache.html (+2/-2)
doc/src/sgml/html/pgcrypto.html (+2/-2)
doc/src/sgml/html/pgfreespacemap.html (+2/-2)
doc/src/sgml/html/pgprewarm.html (+2/-2)
doc/src/sgml/html/pgrowlocks.html (+2/-2)
doc/src/sgml/html/pgstandby.html (+2/-2)
doc/src/sgml/html/pgstatstatements.html (+2/-2)
doc/src/sgml/html/pgstattuple.html (+2/-2)
doc/src/sgml/html/pgtestfsync.html (+2/-2)
doc/src/sgml/html/pgtesttiming.html (+2/-2)
doc/src/sgml/html/pgtrgm.html (+2/-2)
doc/src/sgml/html/pgupgrade.html (+2/-2)
doc/src/sgml/html/pgvisibility.html (+2/-2)
doc/src/sgml/html/pgwaldump.html (+2/-2)
doc/src/sgml/html/pgxlogdump.html (+3/-3)
doc/src/sgml/html/planner-optimizer.html (+2/-2)
doc/src/sgml/html/planner-stats-details.html (+2/-2)
doc/src/sgml/html/planner-stats-security.html (+2/-2)
doc/src/sgml/html/planner-stats.html (+2/-2)
doc/src/sgml/html/plhandler.html (+2/-2)
doc/src/sgml/html/plperl-builtins.html (+2/-2)
doc/src/sgml/html/plperl-data.html (+2/-2)
doc/src/sgml/html/plperl-event-triggers.html (+2/-2)
doc/src/sgml/html/plperl-funcs.html (+2/-2)
doc/src/sgml/html/plperl-global.html (+2/-2)
doc/src/sgml/html/plperl-triggers.html (+2/-2)
doc/src/sgml/html/plperl-trusted.html (+2/-2)
doc/src/sgml/html/plperl-under-the-hood.html (+2/-2)
doc/src/sgml/html/plperl.html (+2/-2)
doc/src/sgml/html/plpgsql-control-structures.html (+2/-2)
doc/src/sgml/html/plpgsql-cursors.html (+2/-2)
doc/src/sgml/html/plpgsql-declarations.html (+2/-2)
doc/src/sgml/html/plpgsql-development-tips.html (+2/-2)
doc/src/sgml/html/plpgsql-errors-and-messages.html (+2/-2)
doc/src/sgml/html/plpgsql-expressions.html (+2/-2)
doc/src/sgml/html/plpgsql-implementation.html (+2/-2)
doc/src/sgml/html/plpgsql-overview.html (+2/-2)
doc/src/sgml/html/plpgsql-porting.html (+2/-2)
doc/src/sgml/html/plpgsql-statements.html (+2/-2)
doc/src/sgml/html/plpgsql-structure.html (+2/-2)
doc/src/sgml/html/plpgsql-transactions.html (+2/-2)
doc/src/sgml/html/plpgsql-trigger.html (+2/-2)
doc/src/sgml/html/plpgsql.html (+1/-1)
doc/src/sgml/html/plpython-data.html (+2/-2)
doc/src/sgml/html/plpython-database.html (+2/-2)
doc/src/sgml/html/plpython-do.html (+2/-2)
doc/src/sgml/html/plpython-envar.html (+2/-2)
doc/src/sgml/html/plpython-funcs.html (+2/-2)
doc/src/sgml/html/plpython-python23.html (+2/-2)
doc/src/sgml/html/plpython-sharing.html (+2/-2)
doc/src/sgml/html/plpython-subtransaction.html (+2/-2)
doc/src/sgml/html/plpython-transactions.html (+2/-2)
doc/src/sgml/html/plpython-trigger.html (+2/-2)
doc/src/sgml/html/plpython-util.html (+2/-2)
doc/src/sgml/html/plpython.html (+2/-2)
doc/src/sgml/html/pltcl-config.html (+2/-2)
doc/src/sgml/html/pltcl-data.html (+2/-2)
doc/src/sgml/html/pltcl-dbaccess.html (+2/-2)
doc/src/sgml/html/pltcl-error-handling.html (+2/-2)
doc/src/sgml/html/pltcl-event-trigger.html (+2/-2)
doc/src/sgml/html/pltcl-functions.html (+2/-2)
doc/src/sgml/html/pltcl-global.html (+2/-2)
doc/src/sgml/html/pltcl-overview.html (+2/-2)
doc/src/sgml/html/pltcl-procnames.html (+2/-2)
doc/src/sgml/html/pltcl-subtransactions.html (+2/-2)
doc/src/sgml/html/pltcl-transactions.html (+2/-2)
doc/src/sgml/html/pltcl-trigger.html (+2/-2)
doc/src/sgml/html/pltcl.html (+2/-2)
doc/src/sgml/html/populate.html (+2/-2)
doc/src/sgml/html/postgres-fdw.html (+6/-5)
doc/src/sgml/html/postgres-user.html (+2/-2)
doc/src/sgml/html/preface.html (+2/-2)
doc/src/sgml/html/preventing-server-spoofing.html (+2/-2)
doc/src/sgml/html/progress-reporting.html (+2/-2)
doc/src/sgml/html/protocol-changes.html (+2/-2)
doc/src/sgml/html/protocol-error-fields.html (+2/-2)
doc/src/sgml/html/protocol-flow.html (+2/-2)
doc/src/sgml/html/protocol-logical-replication.html (+2/-2)
doc/src/sgml/html/protocol-logicalrep-message-formats.html (+2/-2)
doc/src/sgml/html/protocol-message-formats.html (+2/-2)
doc/src/sgml/html/protocol-message-types.html (+2/-2)
doc/src/sgml/html/protocol-overview.html (+2/-2)
doc/src/sgml/html/protocol-replication.html (+2/-2)
doc/src/sgml/html/protocol.html (+2/-2)
doc/src/sgml/html/queries-limit.html (+2/-2)
doc/src/sgml/html/queries-order.html (+2/-2)
doc/src/sgml/html/queries-overview.html (+2/-2)
doc/src/sgml/html/queries-select-lists.html (+2/-2)
doc/src/sgml/html/queries-table-expressions.html (+2/-2)
doc/src/sgml/html/queries-union.html (+2/-2)
doc/src/sgml/html/queries-values.html (+2/-2)
doc/src/sgml/html/queries-with.html (+2/-2)
doc/src/sgml/html/queries.html (+2/-2)
doc/src/sgml/html/query-path.html (+2/-2)
doc/src/sgml/html/querytree.html (+2/-2)
doc/src/sgml/html/rangetypes.html (+2/-2)
doc/src/sgml/html/recovery-config.html (+3/-3)
doc/src/sgml/html/reference-client.html (+2/-2)
doc/src/sgml/html/reference-server.html (+2/-2)
doc/src/sgml/html/reference.html (+2/-2)
doc/src/sgml/html/regress-coverage.html (+2/-2)
doc/src/sgml/html/regress-evaluation.html (+2/-2)
doc/src/sgml/html/regress-run.html (+2/-2)
doc/src/sgml/html/regress-tap.html (+2/-2)
doc/src/sgml/html/regress-variant.html (+2/-2)
doc/src/sgml/html/regress.html (+2/-2)
doc/src/sgml/html/release-13-1.html (+5/-5)
doc/src/sgml/html/release-13-2.html (+5/-5)
doc/src/sgml/html/release-13-3.html (+6/-6)
doc/src/sgml/html/release-13-4.html (+6/-6)
doc/src/sgml/html/release-13-5.html (+6/-6)
doc/src/sgml/html/release-13-6.html (+6/-6)
doc/src/sgml/html/release-13-7.html (+328/-0)
doc/src/sgml/html/release-13.html (+26/-26)
doc/src/sgml/html/release-prior.html (+2/-2)
doc/src/sgml/html/release.html (+2/-2)
doc/src/sgml/html/replication-origins.html (+2/-2)
doc/src/sgml/html/resources.html (+2/-2)
doc/src/sgml/html/role-attributes.html (+2/-2)
doc/src/sgml/html/role-membership.html (+2/-2)
doc/src/sgml/html/role-removal.html (+2/-2)
doc/src/sgml/html/routine-reindex.html (+2/-2)
doc/src/sgml/html/routine-vacuuming.html (+22/-2)
doc/src/sgml/html/row-estimation-examples.html (+2/-2)
doc/src/sgml/html/rowtypes.html (+2/-2)
doc/src/sgml/html/rule-system.html (+2/-2)
doc/src/sgml/html/rules-materializedviews.html (+2/-2)
doc/src/sgml/html/rules-privileges.html (+2/-2)
doc/src/sgml/html/rules-status.html (+2/-2)
doc/src/sgml/html/rules-triggers.html (+2/-2)
doc/src/sgml/html/rules-update.html (+2/-2)
doc/src/sgml/html/rules-views.html (+2/-2)
doc/src/sgml/html/rules.html (+2/-2)
doc/src/sgml/html/runtime-config-autovacuum.html (+2/-2)
doc/src/sgml/html/runtime-config-client.html (+2/-2)
doc/src/sgml/html/runtime-config-compatible.html (+2/-2)
doc/src/sgml/html/runtime-config-connection.html (+2/-2)
doc/src/sgml/html/runtime-config-custom.html (+2/-2)
doc/src/sgml/html/runtime-config-developer.html (+2/-2)
doc/src/sgml/html/runtime-config-error-handling.html (+2/-2)
doc/src/sgml/html/runtime-config-file-locations.html (+2/-2)
doc/src/sgml/html/runtime-config-locks.html (+2/-2)
doc/src/sgml/html/runtime-config-logging.html (+2/-2)
doc/src/sgml/html/runtime-config-preset.html (+2/-2)
doc/src/sgml/html/runtime-config-query.html (+2/-2)
doc/src/sgml/html/runtime-config-replication.html (+2/-2)
doc/src/sgml/html/runtime-config-resource.html (+2/-2)
doc/src/sgml/html/runtime-config-short.html (+2/-2)
doc/src/sgml/html/runtime-config-statistics.html (+2/-2)
doc/src/sgml/html/runtime-config-wal.html (+2/-2)
doc/src/sgml/html/runtime-config.html (+2/-2)
doc/src/sgml/html/runtime.html (+2/-2)
doc/src/sgml/html/sasl-authentication.html (+2/-2)
doc/src/sgml/html/seg.html (+2/-2)
doc/src/sgml/html/sepgsql.html (+2/-2)
doc/src/sgml/html/server-programming.html (+2/-2)
doc/src/sgml/html/server-shutdown.html (+2/-2)
doc/src/sgml/html/server-start.html (+6/-6)
doc/src/sgml/html/source-conventions.html (+2/-2)
doc/src/sgml/html/source-format.html (+2/-2)
doc/src/sgml/html/source.html (+1/-1)
doc/src/sgml/html/sourcerepo.html (+2/-2)
doc/src/sgml/html/spgist-builtin-opclasses.html (+2/-2)
doc/src/sgml/html/spgist-examples.html (+2/-2)
doc/src/sgml/html/spgist-extensibility.html (+2/-2)
doc/src/sgml/html/spgist-implementation.html (+2/-2)
doc/src/sgml/html/spgist-intro.html (+2/-2)
doc/src/sgml/html/spgist.html (+1/-1)
doc/src/sgml/html/spi-examples.html (+2/-2)
doc/src/sgml/html/spi-interface-support.html (+2/-2)
doc/src/sgml/html/spi-interface.html (+2/-2)
doc/src/sgml/html/spi-memory.html (+2/-2)
doc/src/sgml/html/spi-realloc.html (+2/-2)
doc/src/sgml/html/spi-spi-commit.html (+2/-2)
doc/src/sgml/html/spi-spi-connect.html (+2/-2)
doc/src/sgml/html/spi-spi-copytuple.html (+2/-2)
doc/src/sgml/html/spi-spi-cursor-close.html (+2/-2)
doc/src/sgml/html/spi-spi-cursor-fetch.html (+2/-2)
doc/src/sgml/html/spi-spi-cursor-find.html (+2/-2)
doc/src/sgml/html/spi-spi-cursor-move.html (+2/-2)
doc/src/sgml/html/spi-spi-cursor-open-with-args.html (+2/-2)
doc/src/sgml/html/spi-spi-cursor-open-with-paramlist.html (+2/-2)
doc/src/sgml/html/spi-spi-cursor-open.html (+2/-2)
doc/src/sgml/html/spi-spi-exec.html (+2/-2)
doc/src/sgml/html/spi-spi-execp.html (+2/-2)
doc/src/sgml/html/spi-spi-execute-plan-with-paramlist.html (+2/-2)
doc/src/sgml/html/spi-spi-execute-plan.html (+2/-2)
doc/src/sgml/html/spi-spi-execute-with-args.html (+2/-2)
doc/src/sgml/html/spi-spi-execute.html (+2/-2)
doc/src/sgml/html/spi-spi-finish.html (+2/-2)
doc/src/sgml/html/spi-spi-fname.html (+2/-2)
doc/src/sgml/html/spi-spi-fnumber.html (+2/-2)
doc/src/sgml/html/spi-spi-freeplan.html (+2/-2)
doc/src/sgml/html/spi-spi-freetuple.html (+2/-2)
doc/src/sgml/html/spi-spi-freetupletable.html (+2/-2)
doc/src/sgml/html/spi-spi-getargcount.html (+2/-2)
doc/src/sgml/html/spi-spi-getargtypeid.html (+2/-2)
doc/src/sgml/html/spi-spi-getbinval.html (+2/-2)
doc/src/sgml/html/spi-spi-getnspname.html (+2/-2)
doc/src/sgml/html/spi-spi-getrelname.html (+2/-2)
doc/src/sgml/html/spi-spi-gettype.html (+2/-2)
doc/src/sgml/html/spi-spi-gettypeid.html (+2/-2)
doc/src/sgml/html/spi-spi-getvalue.html (+2/-2)
doc/src/sgml/html/spi-spi-is-cursor-plan.html (+2/-2)
doc/src/sgml/html/spi-spi-keepplan.html (+2/-2)
doc/src/sgml/html/spi-spi-modifytuple.html (+2/-2)
doc/src/sgml/html/spi-spi-palloc.html (+2/-2)
doc/src/sgml/html/spi-spi-pfree.html (+2/-2)
doc/src/sgml/html/spi-spi-prepare-cursor.html (+2/-2)
doc/src/sgml/html/spi-spi-prepare-params.html (+2/-2)
doc/src/sgml/html/spi-spi-prepare.html (+2/-2)
doc/src/sgml/html/spi-spi-register-relation.html (+2/-2)
doc/src/sgml/html/spi-spi-register-trigger-data.html (+2/-2)
doc/src/sgml/html/spi-spi-result-code-string.html (+2/-2)
doc/src/sgml/html/spi-spi-returntuple.html (+2/-2)
doc/src/sgml/html/spi-spi-rollback.html (+2/-2)
doc/src/sgml/html/spi-spi-saveplan.html (+2/-2)
doc/src/sgml/html/spi-spi-scroll-cursor-fetch.html (+2/-2)
doc/src/sgml/html/spi-spi-scroll-cursor-move.html (+2/-2)
doc/src/sgml/html/spi-spi-start-transaction.html (+2/-2)
doc/src/sgml/html/spi-spi-unregister-relation.html (+2/-2)
doc/src/sgml/html/spi-transaction.html (+2/-2)
doc/src/sgml/html/spi-visibility.html (+2/-2)
doc/src/sgml/html/spi.html (+2/-2)
doc/src/sgml/html/sql-abort.html (+2/-2)
doc/src/sgml/html/sql-alteraggregate.html (+2/-2)
doc/src/sgml/html/sql-altercollation.html (+2/-2)
doc/src/sgml/html/sql-alterconversion.html (+2/-2)
doc/src/sgml/html/sql-alterdatabase.html (+2/-2)
doc/src/sgml/html/sql-alterdefaultprivileges.html (+2/-2)
doc/src/sgml/html/sql-alterdomain.html (+2/-2)
doc/src/sgml/html/sql-altereventtrigger.html (+2/-2)
doc/src/sgml/html/sql-alterextension.html (+2/-2)
doc/src/sgml/html/sql-alterforeigndatawrapper.html (+2/-2)
doc/src/sgml/html/sql-alterforeigntable.html (+2/-2)
doc/src/sgml/html/sql-alterfunction.html (+2/-2)
doc/src/sgml/html/sql-altergroup.html (+2/-2)
doc/src/sgml/html/sql-alterindex.html (+2/-2)
doc/src/sgml/html/sql-alterlanguage.html (+2/-2)
doc/src/sgml/html/sql-alterlargeobject.html (+2/-2)
doc/src/sgml/html/sql-altermaterializedview.html (+3/-2)
doc/src/sgml/html/sql-alteropclass.html (+2/-2)
doc/src/sgml/html/sql-alteroperator.html (+2/-2)
doc/src/sgml/html/sql-alteropfamily.html (+2/-2)
doc/src/sgml/html/sql-alterpolicy.html (+2/-2)
doc/src/sgml/html/sql-alterprocedure.html (+2/-2)
doc/src/sgml/html/sql-alterpublication.html (+2/-2)
doc/src/sgml/html/sql-alterrole.html (+2/-2)
doc/src/sgml/html/sql-alterroutine.html (+2/-2)
doc/src/sgml/html/sql-alterrule.html (+2/-2)
doc/src/sgml/html/sql-alterschema.html (+2/-2)
doc/src/sgml/html/sql-altersequence.html (+2/-2)
doc/src/sgml/html/sql-alterserver.html (+2/-2)
doc/src/sgml/html/sql-alterstatistics.html (+2/-2)
doc/src/sgml/html/sql-altersubscription.html (+2/-2)
doc/src/sgml/html/sql-altersystem.html (+2/-2)
doc/src/sgml/html/sql-altertable.html (+7/-6)
doc/src/sgml/html/sql-altertablespace.html (+2/-2)
doc/src/sgml/html/sql-altertrigger.html (+2/-2)
doc/src/sgml/html/sql-altertsconfig.html (+2/-2)
doc/src/sgml/html/sql-altertsdictionary.html (+2/-2)
doc/src/sgml/html/sql-altertsparser.html (+2/-2)
doc/src/sgml/html/sql-altertstemplate.html (+2/-2)
doc/src/sgml/html/sql-altertype.html (+2/-2)
doc/src/sgml/html/sql-alteruser.html (+2/-2)
doc/src/sgml/html/sql-alterusermapping.html (+2/-2)
doc/src/sgml/html/sql-alterview.html (+2/-2)
doc/src/sgml/html/sql-analyze.html (+25/-5)
doc/src/sgml/html/sql-begin.html (+2/-2)
doc/src/sgml/html/sql-call.html (+2/-2)
doc/src/sgml/html/sql-checkpoint.html (+2/-2)
doc/src/sgml/html/sql-close.html (+2/-2)
doc/src/sgml/html/sql-cluster.html (+2/-2)
doc/src/sgml/html/sql-commands.html (+2/-2)
doc/src/sgml/html/sql-comment.html (+2/-2)
doc/src/sgml/html/sql-commit-prepared.html (+2/-2)
doc/src/sgml/html/sql-commit.html (+2/-2)
doc/src/sgml/html/sql-copy.html (+2/-2)
doc/src/sgml/html/sql-create-access-method.html (+2/-2)
doc/src/sgml/html/sql-createaggregate.html (+2/-2)
doc/src/sgml/html/sql-createcast.html (+2/-2)
doc/src/sgml/html/sql-createcollation.html (+2/-2)
doc/src/sgml/html/sql-createconversion.html (+2/-2)
doc/src/sgml/html/sql-createdatabase.html (+2/-2)
doc/src/sgml/html/sql-createdomain.html (+2/-2)
doc/src/sgml/html/sql-createeventtrigger.html (+2/-2)
doc/src/sgml/html/sql-createextension.html (+2/-2)
doc/src/sgml/html/sql-createforeigndatawrapper.html (+2/-2)
doc/src/sgml/html/sql-createforeigntable.html (+2/-2)
doc/src/sgml/html/sql-createfunction.html (+2/-2)
doc/src/sgml/html/sql-creategroup.html (+2/-2)
doc/src/sgml/html/sql-createindex.html (+2/-2)
doc/src/sgml/html/sql-createlanguage.html (+2/-2)
doc/src/sgml/html/sql-creatematerializedview.html (+2/-2)
doc/src/sgml/html/sql-createopclass.html (+2/-2)
doc/src/sgml/html/sql-createoperator.html (+2/-2)
doc/src/sgml/html/sql-createopfamily.html (+2/-2)
doc/src/sgml/html/sql-createpolicy.html (+2/-2)
doc/src/sgml/html/sql-createprocedure.html (+2/-2)
doc/src/sgml/html/sql-createpublication.html (+2/-2)
doc/src/sgml/html/sql-createrole.html (+2/-2)
doc/src/sgml/html/sql-createrule.html (+2/-2)
doc/src/sgml/html/sql-createschema.html (+2/-2)
doc/src/sgml/html/sql-createsequence.html (+2/-2)
doc/src/sgml/html/sql-createserver.html (+2/-2)
doc/src/sgml/html/sql-createstatistics.html (+2/-2)
doc/src/sgml/html/sql-createsubscription.html (+2/-2)
doc/src/sgml/html/sql-createtable.html (+2/-2)
doc/src/sgml/html/sql-createtableas.html (+2/-2)
doc/src/sgml/html/sql-createtablespace.html (+2/-2)
doc/src/sgml/html/sql-createtransform.html (+2/-2)
doc/src/sgml/html/sql-createtrigger.html (+2/-2)
doc/src/sgml/html/sql-createtsconfig.html (+2/-2)
doc/src/sgml/html/sql-createtsdictionary.html (+2/-2)
doc/src/sgml/html/sql-createtsparser.html (+2/-2)
doc/src/sgml/html/sql-createtstemplate.html (+2/-2)
doc/src/sgml/html/sql-createtype.html (+2/-2)
doc/src/sgml/html/sql-createuser.html (+2/-2)
doc/src/sgml/html/sql-createusermapping.html (+2/-2)
doc/src/sgml/html/sql-createview.html (+2/-2)
doc/src/sgml/html/sql-deallocate.html (+2/-2)
doc/src/sgml/html/sql-declare.html (+2/-2)
doc/src/sgml/html/sql-delete.html (+2/-2)
doc/src/sgml/html/sql-discard.html (+2/-2)
doc/src/sgml/html/sql-do.html (+2/-2)
doc/src/sgml/html/sql-drop-access-method.html (+2/-2)
doc/src/sgml/html/sql-drop-owned.html (+2/-2)
doc/src/sgml/html/sql-dropaggregate.html (+2/-2)
doc/src/sgml/html/sql-dropcast.html (+2/-2)
doc/src/sgml/html/sql-dropcollation.html (+2/-2)
doc/src/sgml/html/sql-dropconversion.html (+2/-2)
doc/src/sgml/html/sql-dropdatabase.html (+2/-2)
doc/src/sgml/html/sql-dropdomain.html (+2/-2)
doc/src/sgml/html/sql-dropeventtrigger.html (+2/-2)
doc/src/sgml/html/sql-dropextension.html (+2/-2)
doc/src/sgml/html/sql-dropforeigndatawrapper.html (+2/-2)
doc/src/sgml/html/sql-dropforeigntable.html (+2/-2)
doc/src/sgml/html/sql-dropfunction.html (+2/-2)
doc/src/sgml/html/sql-dropgroup.html (+2/-2)
doc/src/sgml/html/sql-dropindex.html (+2/-2)
doc/src/sgml/html/sql-droplanguage.html (+2/-2)
doc/src/sgml/html/sql-dropmaterializedview.html (+2/-2)
doc/src/sgml/html/sql-dropopclass.html (+2/-2)
doc/src/sgml/html/sql-dropoperator.html (+2/-2)
doc/src/sgml/html/sql-dropopfamily.html (+2/-2)
doc/src/sgml/html/sql-droppolicy.html (+2/-2)
doc/src/sgml/html/sql-dropprocedure.html (+2/-2)
doc/src/sgml/html/sql-droppublication.html (+2/-2)
doc/src/sgml/html/sql-droprole.html (+2/-2)
doc/src/sgml/html/sql-droproutine.html (+2/-2)
doc/src/sgml/html/sql-droprule.html (+2/-2)
doc/src/sgml/html/sql-dropschema.html (+2/-2)
doc/src/sgml/html/sql-dropsequence.html (+2/-2)
doc/src/sgml/html/sql-dropserver.html (+2/-2)
doc/src/sgml/html/sql-dropstatistics.html (+2/-2)
doc/src/sgml/html/sql-dropsubscription.html (+2/-2)
doc/src/sgml/html/sql-droptable.html (+2/-2)
doc/src/sgml/html/sql-droptablespace.html (+2/-2)
doc/src/sgml/html/sql-droptransform.html (+2/-2)
doc/src/sgml/html/sql-droptrigger.html (+2/-2)
doc/src/sgml/html/sql-droptsconfig.html (+2/-2)
doc/src/sgml/html/sql-droptsdictionary.html (+2/-2)
doc/src/sgml/html/sql-droptsparser.html (+2/-2)
doc/src/sgml/html/sql-droptstemplate.html (+2/-2)
doc/src/sgml/html/sql-droptype.html (+2/-2)
doc/src/sgml/html/sql-dropuser.html (+2/-2)
doc/src/sgml/html/sql-dropusermapping.html (+2/-2)
doc/src/sgml/html/sql-dropview.html (+2/-2)
doc/src/sgml/html/sql-end.html (+2/-2)
doc/src/sgml/html/sql-execute.html (+2/-2)
doc/src/sgml/html/sql-explain.html (+2/-2)
doc/src/sgml/html/sql-expressions.html (+2/-2)
doc/src/sgml/html/sql-fetch.html (+2/-2)
doc/src/sgml/html/sql-grant.html (+2/-2)
doc/src/sgml/html/sql-importforeignschema.html (+2/-2)
doc/src/sgml/html/sql-insert.html (+2/-2)
doc/src/sgml/html/sql-keywords-appendix.html (+3/-3)
doc/src/sgml/html/sql-listen.html (+2/-2)
doc/src/sgml/html/sql-load.html (+2/-2)
doc/src/sgml/html/sql-lock.html (+2/-2)
doc/src/sgml/html/sql-move.html (+2/-2)
doc/src/sgml/html/sql-notify.html (+2/-2)
doc/src/sgml/html/sql-prepare-transaction.html (+2/-2)
doc/src/sgml/html/sql-prepare.html (+2/-2)
doc/src/sgml/html/sql-reassign-owned.html (+2/-2)
doc/src/sgml/html/sql-refreshmaterializedview.html (+2/-2)
doc/src/sgml/html/sql-reindex.html (+2/-2)
doc/src/sgml/html/sql-release-savepoint.html (+2/-2)
doc/src/sgml/html/sql-reset.html (+2/-2)
doc/src/sgml/html/sql-revoke.html (+2/-2)
doc/src/sgml/html/sql-rollback-prepared.html (+2/-2)
doc/src/sgml/html/sql-rollback-to.html (+2/-2)
doc/src/sgml/html/sql-rollback.html (+2/-2)
doc/src/sgml/html/sql-savepoint.html (+2/-2)
doc/src/sgml/html/sql-security-label.html (+2/-2)
doc/src/sgml/html/sql-select.html (+2/-2)
doc/src/sgml/html/sql-selectinto.html (+2/-2)
doc/src/sgml/html/sql-set-constraints.html (+2/-2)
doc/src/sgml/html/sql-set-role.html (+2/-2)
doc/src/sgml/html/sql-set-session-authorization.html (+2/-2)
doc/src/sgml/html/sql-set-transaction.html (+2/-2)
doc/src/sgml/html/sql-set.html (+2/-2)
doc/src/sgml/html/sql-show.html (+2/-2)
doc/src/sgml/html/sql-start-transaction.html (+2/-2)
doc/src/sgml/html/sql-syntax-calling-funcs.html (+2/-2)
doc/src/sgml/html/sql-syntax-lexical.html (+2/-2)
doc/src/sgml/html/sql-syntax.html (+2/-2)
doc/src/sgml/html/sql-truncate.html (+2/-2)
doc/src/sgml/html/sql-unlisten.html (+2/-2)
doc/src/sgml/html/sql-update.html (+2/-2)
doc/src/sgml/html/sql-vacuum.html (+2/-2)
doc/src/sgml/html/sql-values.html (+2/-2)
doc/src/sgml/html/sql.html (+2/-2)
doc/src/sgml/html/ssh-tunnels.html (+2/-2)
doc/src/sgml/html/ssl-tcp.html (+2/-2)
doc/src/sgml/html/sslinfo.html (+2/-2)
doc/src/sgml/html/sspi-auth.html (+2/-2)
doc/src/sgml/html/storage-file-layout.html (+2/-2)
doc/src/sgml/html/storage-fsm.html (+2/-2)
doc/src/sgml/html/storage-init.html (+2/-2)
doc/src/sgml/html/storage-page-layout.html (+2/-2)
doc/src/sgml/html/storage-toast.html (+2/-2)
doc/src/sgml/html/storage-vm.html (+2/-2)
doc/src/sgml/html/storage.html (+2/-2)
doc/src/sgml/html/supported-platforms.html (+2/-2)
doc/src/sgml/html/system-catalog-declarations.html (+2/-2)
doc/src/sgml/html/system-catalog-initial-data.html (+2/-2)
doc/src/sgml/html/tableam.html (+2/-2)
doc/src/sgml/html/tablefunc.html (+2/-2)
doc/src/sgml/html/tablesample-method.html (+2/-2)
doc/src/sgml/html/tablesample-support-functions.html (+2/-2)
doc/src/sgml/html/tcn.html (+2/-2)
doc/src/sgml/html/test-decoding.html (+2/-2)
doc/src/sgml/html/textsearch-configuration.html (+2/-2)
doc/src/sgml/html/textsearch-controls.html (+2/-2)
doc/src/sgml/html/textsearch-debugging.html (+2/-2)
doc/src/sgml/html/textsearch-dictionaries.html (+2/-2)
doc/src/sgml/html/textsearch-features.html (+2/-2)
doc/src/sgml/html/textsearch-indexes.html (+9/-5)
doc/src/sgml/html/textsearch-intro.html (+3/-3)
doc/src/sgml/html/textsearch-limitations.html (+2/-2)
doc/src/sgml/html/textsearch-parsers.html (+2/-2)
doc/src/sgml/html/textsearch-psql.html (+2/-2)
doc/src/sgml/html/textsearch-tables.html (+4/-4)
doc/src/sgml/html/textsearch.html (+1/-1)
doc/src/sgml/html/transaction-iso.html (+2/-2)
doc/src/sgml/html/trigger-datachanges.html (+2/-2)
doc/src/sgml/html/trigger-definition.html (+2/-2)
doc/src/sgml/html/trigger-example.html (+2/-2)
doc/src/sgml/html/trigger-interface.html (+2/-2)
doc/src/sgml/html/triggers.html (+2/-2)
doc/src/sgml/html/tsm-system-rows.html (+2/-2)
doc/src/sgml/html/tsm-system-time.html (+2/-2)
doc/src/sgml/html/tutorial-accessdb.html (+4/-4)
doc/src/sgml/html/tutorial-advanced-intro.html (+2/-2)
doc/src/sgml/html/tutorial-advanced.html (+1/-1)
doc/src/sgml/html/tutorial-agg.html (+2/-2)
doc/src/sgml/html/tutorial-arch.html (+2/-2)
doc/src/sgml/html/tutorial-concepts.html (+2/-2)
doc/src/sgml/html/tutorial-conclusion.html (+2/-2)
doc/src/sgml/html/tutorial-createdb.html (+2/-2)
doc/src/sgml/html/tutorial-delete.html (+2/-2)
doc/src/sgml/html/tutorial-fk.html (+2/-2)
doc/src/sgml/html/tutorial-inheritance.html (+2/-2)
doc/src/sgml/html/tutorial-install.html (+2/-2)
doc/src/sgml/html/tutorial-join.html (+2/-2)
doc/src/sgml/html/tutorial-populate.html (+2/-2)
doc/src/sgml/html/tutorial-select.html (+2/-2)
doc/src/sgml/html/tutorial-sql-intro.html (+2/-2)
doc/src/sgml/html/tutorial-sql.html (+1/-1)
doc/src/sgml/html/tutorial-start.html (+1/-1)
doc/src/sgml/html/tutorial-table.html (+2/-2)
doc/src/sgml/html/tutorial-transactions.html (+2/-2)
doc/src/sgml/html/tutorial-update.html (+2/-2)
doc/src/sgml/html/tutorial-views.html (+2/-2)
doc/src/sgml/html/tutorial-window.html (+2/-2)
doc/src/sgml/html/tutorial.html (+2/-2)
doc/src/sgml/html/typeconv-func.html (+2/-2)
doc/src/sgml/html/typeconv-oper.html (+2/-2)
doc/src/sgml/html/typeconv-overview.html (+2/-2)
doc/src/sgml/html/typeconv-query.html (+2/-2)
doc/src/sgml/html/typeconv-select.html (+2/-2)
doc/src/sgml/html/typeconv-union-case.html (+2/-2)
doc/src/sgml/html/typeconv.html (+2/-2)
doc/src/sgml/html/unaccent.html (+2/-2)
doc/src/sgml/html/unsupported-features-sql-standard.html (+2/-2)
doc/src/sgml/html/upgrading.html (+3/-3)
doc/src/sgml/html/user-manag.html (+2/-2)
doc/src/sgml/html/using-explain.html (+2/-2)
doc/src/sgml/html/uuid-ossp.html (+2/-2)
doc/src/sgml/html/vacuumlo.html (+2/-2)
doc/src/sgml/html/view-pg-available-extension-versions.html (+2/-2)
doc/src/sgml/html/view-pg-available-extensions.html (+2/-2)
doc/src/sgml/html/view-pg-config.html (+2/-2)
doc/src/sgml/html/view-pg-cursors.html (+2/-2)
doc/src/sgml/html/view-pg-file-settings.html (+2/-2)
doc/src/sgml/html/view-pg-group.html (+2/-2)
doc/src/sgml/html/view-pg-hba-file-rules.html (+2/-2)
doc/src/sgml/html/view-pg-indexes.html (+2/-2)
doc/src/sgml/html/view-pg-locks.html (+2/-2)
doc/src/sgml/html/view-pg-matviews.html (+2/-2)
doc/src/sgml/html/view-pg-policies.html (+2/-2)
doc/src/sgml/html/view-pg-prepared-statements.html (+2/-2)
doc/src/sgml/html/view-pg-prepared-xacts.html (+2/-2)
doc/src/sgml/html/view-pg-publication-tables.html (+2/-2)
doc/src/sgml/html/view-pg-replication-origin-status.html (+2/-2)
doc/src/sgml/html/view-pg-replication-slots.html (+2/-2)
doc/src/sgml/html/view-pg-roles.html (+2/-2)
doc/src/sgml/html/view-pg-rules.html (+2/-2)
doc/src/sgml/html/view-pg-seclabels.html (+2/-2)
doc/src/sgml/html/view-pg-sequences.html (+2/-2)
doc/src/sgml/html/view-pg-settings.html (+2/-2)
doc/src/sgml/html/view-pg-shadow.html (+2/-2)
doc/src/sgml/html/view-pg-shmem-allocations.html (+2/-2)
doc/src/sgml/html/view-pg-stats-ext.html (+2/-2)
doc/src/sgml/html/view-pg-stats.html (+2/-2)
doc/src/sgml/html/view-pg-tables.html (+2/-2)
doc/src/sgml/html/view-pg-timezone-abbrevs.html (+2/-2)
doc/src/sgml/html/view-pg-timezone-names.html (+2/-2)
doc/src/sgml/html/view-pg-user-mappings.html (+2/-2)
doc/src/sgml/html/view-pg-user.html (+2/-2)
doc/src/sgml/html/view-pg-views.html (+2/-2)
doc/src/sgml/html/views-overview.html (+2/-2)
doc/src/sgml/html/wal-async-commit.html (+2/-2)
doc/src/sgml/html/wal-configuration.html (+2/-2)
doc/src/sgml/html/wal-internals.html (+2/-2)
doc/src/sgml/html/wal-intro.html (+2/-2)
doc/src/sgml/html/wal-reliability.html (+2/-2)
doc/src/sgml/html/wal.html (+2/-2)
doc/src/sgml/html/warm-standby-failover.html (+2/-2)
doc/src/sgml/html/warm-standby.html (+2/-2)
doc/src/sgml/html/when-can-parallel-query-be-used.html (+2/-2)
doc/src/sgml/html/xaggr.html (+2/-2)
doc/src/sgml/html/xfunc-c.html (+2/-2)
doc/src/sgml/html/xfunc-internal.html (+2/-2)
doc/src/sgml/html/xfunc-optimization.html (+2/-2)
doc/src/sgml/html/xfunc-overload.html (+2/-2)
doc/src/sgml/html/xfunc-pl.html (+2/-2)
doc/src/sgml/html/xfunc-sql.html (+2/-2)
doc/src/sgml/html/xfunc-volatility.html (+2/-2)
doc/src/sgml/html/xfunc.html (+2/-2)
doc/src/sgml/html/xindex.html (+2/-2)
doc/src/sgml/html/xml-limits-conformance.html (+2/-2)
doc/src/sgml/html/xml2.html (+2/-2)
doc/src/sgml/html/xoper-optimization.html (+3/-3)
doc/src/sgml/html/xoper.html (+2/-2)
doc/src/sgml/html/xplang-install.html (+2/-2)
doc/src/sgml/html/xplang.html (+2/-2)
doc/src/sgml/html/xproc.html (+2/-2)
doc/src/sgml/html/xtypes.html (+2/-2)
doc/src/sgml/libpq.sgml (+19/-7)
doc/src/sgml/maintenance.sgml (+29/-0)
doc/src/sgml/man1/clusterdb.1 (+4/-4)
doc/src/sgml/man1/createdb.1 (+4/-4)
doc/src/sgml/man1/createuser.1 (+4/-4)
doc/src/sgml/man1/dropdb.1 (+4/-4)
doc/src/sgml/man1/dropuser.1 (+4/-4)
doc/src/sgml/man1/ecpg.1 (+4/-4)
doc/src/sgml/man1/initdb.1 (+4/-4)
doc/src/sgml/man1/oid2name.1 (+4/-4)
doc/src/sgml/man1/pg_archivecleanup.1 (+4/-4)
doc/src/sgml/man1/pg_basebackup.1 (+4/-4)
doc/src/sgml/man1/pg_checksums.1 (+4/-4)
doc/src/sgml/man1/pg_config.1 (+4/-4)
doc/src/sgml/man1/pg_controldata.1 (+4/-4)
doc/src/sgml/man1/pg_ctl.1 (+4/-4)
doc/src/sgml/man1/pg_dump.1 (+4/-4)
doc/src/sgml/man1/pg_dumpall.1 (+4/-4)
doc/src/sgml/man1/pg_isready.1 (+4/-4)
doc/src/sgml/man1/pg_receivewal.1 (+4/-4)
doc/src/sgml/man1/pg_recvlogical.1 (+4/-4)
doc/src/sgml/man1/pg_resetwal.1 (+4/-4)
doc/src/sgml/man1/pg_restore.1 (+4/-4)
doc/src/sgml/man1/pg_rewind.1 (+5/-5)
doc/src/sgml/man1/pg_standby.1 (+4/-4)
doc/src/sgml/man1/pg_test_fsync.1 (+4/-4)
doc/src/sgml/man1/pg_test_timing.1 (+4/-4)
doc/src/sgml/man1/pg_upgrade.1 (+5/-5)
doc/src/sgml/man1/pg_verifybackup.1 (+4/-4)
doc/src/sgml/man1/pg_waldump.1 (+4/-4)
doc/src/sgml/man1/pgbench.1 (+4/-4)
doc/src/sgml/man1/postgres.1 (+4/-4)
doc/src/sgml/man1/postmaster.1 (+4/-4)
doc/src/sgml/man1/psql.1 (+5/-5)
doc/src/sgml/man1/reindexdb.1 (+4/-4)
doc/src/sgml/man1/vacuumdb.1 (+4/-4)
doc/src/sgml/man1/vacuumlo.1 (+4/-4)
doc/src/sgml/man3/SPI_commit.3 (+4/-4)
doc/src/sgml/man3/SPI_connect.3 (+4/-4)
doc/src/sgml/man3/SPI_copytuple.3 (+4/-4)
doc/src/sgml/man3/SPI_cursor_close.3 (+4/-4)
doc/src/sgml/man3/SPI_cursor_fetch.3 (+4/-4)
doc/src/sgml/man3/SPI_cursor_find.3 (+4/-4)
doc/src/sgml/man3/SPI_cursor_move.3 (+4/-4)
doc/src/sgml/man3/SPI_cursor_open.3 (+4/-4)
doc/src/sgml/man3/SPI_cursor_open_with_args.3 (+4/-4)
doc/src/sgml/man3/SPI_cursor_open_with_paramlist.3 (+4/-4)
doc/src/sgml/man3/SPI_exec.3 (+4/-4)
doc/src/sgml/man3/SPI_execp.3 (+4/-4)
doc/src/sgml/man3/SPI_execute.3 (+4/-4)
doc/src/sgml/man3/SPI_execute_plan.3 (+4/-4)
doc/src/sgml/man3/SPI_execute_plan_with_paramlist.3 (+4/-4)
doc/src/sgml/man3/SPI_execute_with_args.3 (+4/-4)
doc/src/sgml/man3/SPI_finish.3 (+4/-4)
doc/src/sgml/man3/SPI_fname.3 (+4/-4)
doc/src/sgml/man3/SPI_fnumber.3 (+4/-4)
doc/src/sgml/man3/SPI_freeplan.3 (+4/-4)
doc/src/sgml/man3/SPI_freetuple.3 (+4/-4)
doc/src/sgml/man3/SPI_freetuptable.3 (+4/-4)
doc/src/sgml/man3/SPI_getargcount.3 (+4/-4)
doc/src/sgml/man3/SPI_getargtypeid.3 (+4/-4)
doc/src/sgml/man3/SPI_getbinval.3 (+4/-4)
doc/src/sgml/man3/SPI_getnspname.3 (+4/-4)
doc/src/sgml/man3/SPI_getrelname.3 (+4/-4)
doc/src/sgml/man3/SPI_gettype.3 (+4/-4)
doc/src/sgml/man3/SPI_gettypeid.3 (+4/-4)
doc/src/sgml/man3/SPI_getvalue.3 (+4/-4)
doc/src/sgml/man3/SPI_is_cursor_plan.3 (+4/-4)
doc/src/sgml/man3/SPI_keepplan.3 (+4/-4)
doc/src/sgml/man3/SPI_modifytuple.3 (+4/-4)
doc/src/sgml/man3/SPI_palloc.3 (+4/-4)
doc/src/sgml/man3/SPI_pfree.3 (+4/-4)
doc/src/sgml/man3/SPI_prepare.3 (+4/-4)
doc/src/sgml/man3/SPI_prepare_cursor.3 (+4/-4)
doc/src/sgml/man3/SPI_prepare_params.3 (+4/-4)
doc/src/sgml/man3/SPI_register_relation.3 (+4/-4)
doc/src/sgml/man3/SPI_register_trigger_data.3 (+4/-4)
doc/src/sgml/man3/SPI_repalloc.3 (+4/-4)
doc/src/sgml/man3/SPI_result_code_string.3 (+4/-4)
doc/src/sgml/man3/SPI_returntuple.3 (+4/-4)
doc/src/sgml/man3/SPI_rollback.3 (+4/-4)
doc/src/sgml/man3/SPI_saveplan.3 (+4/-4)
doc/src/sgml/man3/SPI_scroll_cursor_fetch.3 (+4/-4)
doc/src/sgml/man3/SPI_scroll_cursor_move.3 (+4/-4)
doc/src/sgml/man3/SPI_start_transaction.3 (+4/-4)
doc/src/sgml/man3/SPI_unregister_relation.3 (+4/-4)
doc/src/sgml/man3/dblink.3 (+4/-4)
doc/src/sgml/man3/dblink_build_sql_delete.3 (+4/-4)
doc/src/sgml/man3/dblink_build_sql_insert.3 (+4/-4)
doc/src/sgml/man3/dblink_build_sql_update.3 (+4/-4)
doc/src/sgml/man3/dblink_cancel_query.3 (+4/-4)
doc/src/sgml/man3/dblink_close.3 (+4/-4)
doc/src/sgml/man3/dblink_connect.3 (+4/-4)
doc/src/sgml/man3/dblink_connect_u.3 (+4/-4)
doc/src/sgml/man3/dblink_disconnect.3 (+4/-4)
doc/src/sgml/man3/dblink_error_message.3 (+4/-4)
doc/src/sgml/man3/dblink_exec.3 (+4/-4)
doc/src/sgml/man3/dblink_fetch.3 (+4/-4)
doc/src/sgml/man3/dblink_get_connections.3 (+4/-4)
doc/src/sgml/man3/dblink_get_notify.3 (+4/-4)
doc/src/sgml/man3/dblink_get_pkey.3 (+4/-4)
doc/src/sgml/man3/dblink_get_result.3 (+4/-4)
doc/src/sgml/man3/dblink_is_busy.3 (+4/-4)
doc/src/sgml/man3/dblink_open.3 (+4/-4)
doc/src/sgml/man3/dblink_send_query.3 (+4/-4)
doc/src/sgml/man7/ABORT.7 (+4/-4)
doc/src/sgml/man7/ALTER_AGGREGATE.7 (+4/-4)
doc/src/sgml/man7/ALTER_COLLATION.7 (+4/-4)
doc/src/sgml/man7/ALTER_CONVERSION.7 (+4/-4)
doc/src/sgml/man7/ALTER_DATABASE.7 (+4/-4)
doc/src/sgml/man7/ALTER_DEFAULT_PRIVILEGES.7 (+4/-4)
doc/src/sgml/man7/ALTER_DOMAIN.7 (+4/-4)
doc/src/sgml/man7/ALTER_EVENT_TRIGGER.7 (+4/-4)
doc/src/sgml/man7/ALTER_EXTENSION.7 (+4/-4)
doc/src/sgml/man7/ALTER_FOREIGN_DATA_WRAPPER.7 (+4/-4)
doc/src/sgml/man7/ALTER_FOREIGN_TABLE.7 (+4/-4)
doc/src/sgml/man7/ALTER_FUNCTION.7 (+4/-4)
doc/src/sgml/man7/ALTER_GROUP.7 (+4/-4)
doc/src/sgml/man7/ALTER_INDEX.7 (+4/-4)
doc/src/sgml/man7/ALTER_LANGUAGE.7 (+4/-4)
doc/src/sgml/man7/ALTER_LARGE_OBJECT.7 (+4/-4)
doc/src/sgml/man7/ALTER_MATERIALIZED_VIEW.7 (+5/-4)
doc/src/sgml/man7/ALTER_OPERATOR.7 (+4/-4)
doc/src/sgml/man7/ALTER_OPERATOR_CLASS.7 (+4/-4)
doc/src/sgml/man7/ALTER_OPERATOR_FAMILY.7 (+4/-4)
doc/src/sgml/man7/ALTER_POLICY.7 (+4/-4)
doc/src/sgml/man7/ALTER_PROCEDURE.7 (+4/-4)
doc/src/sgml/man7/ALTER_PUBLICATION.7 (+4/-4)
doc/src/sgml/man7/ALTER_ROLE.7 (+4/-4)
doc/src/sgml/man7/ALTER_ROUTINE.7 (+4/-4)
doc/src/sgml/man7/ALTER_RULE.7 (+4/-4)
doc/src/sgml/man7/ALTER_SCHEMA.7 (+4/-4)
doc/src/sgml/man7/ALTER_SEQUENCE.7 (+4/-4)
doc/src/sgml/man7/ALTER_SERVER.7 (+4/-4)
doc/src/sgml/man7/ALTER_STATISTICS.7 (+4/-4)
doc/src/sgml/man7/ALTER_SUBSCRIPTION.7 (+4/-4)
doc/src/sgml/man7/ALTER_SYSTEM.7 (+4/-4)
doc/src/sgml/man7/ALTER_TABLE.7 (+5/-5)
doc/src/sgml/man7/ALTER_TABLESPACE.7 (+4/-4)
doc/src/sgml/man7/ALTER_TEXT_SEARCH_CONFIGURATION.7 (+4/-4)
doc/src/sgml/man7/ALTER_TEXT_SEARCH_DICTIONARY.7 (+4/-4)
doc/src/sgml/man7/ALTER_TEXT_SEARCH_PARSER.7 (+4/-4)
doc/src/sgml/man7/ALTER_TEXT_SEARCH_TEMPLATE.7 (+4/-4)
doc/src/sgml/man7/ALTER_TRIGGER.7 (+4/-4)
doc/src/sgml/man7/ALTER_TYPE.7 (+4/-4)
doc/src/sgml/man7/ALTER_USER.7 (+4/-4)
doc/src/sgml/man7/ALTER_USER_MAPPING.7 (+4/-4)
doc/src/sgml/man7/ALTER_VIEW.7 (+4/-4)
doc/src/sgml/man7/ANALYZE.7 (+18/-6)
doc/src/sgml/man7/BEGIN.7 (+4/-4)
doc/src/sgml/man7/CALL.7 (+4/-4)
doc/src/sgml/man7/CHECKPOINT.7 (+4/-4)
doc/src/sgml/man7/CLOSE.7 (+4/-4)
doc/src/sgml/man7/CLUSTER.7 (+4/-4)
doc/src/sgml/man7/COMMENT.7 (+4/-4)
doc/src/sgml/man7/COMMIT.7 (+4/-4)
doc/src/sgml/man7/COMMIT_PREPARED.7 (+4/-4)
doc/src/sgml/man7/COPY.7 (+4/-4)
doc/src/sgml/man7/CREATE_ACCESS_METHOD.7 (+4/-4)
doc/src/sgml/man7/CREATE_AGGREGATE.7 (+4/-4)
doc/src/sgml/man7/CREATE_CAST.7 (+4/-4)
doc/src/sgml/man7/CREATE_COLLATION.7 (+4/-4)
doc/src/sgml/man7/CREATE_CONVERSION.7 (+4/-4)
doc/src/sgml/man7/CREATE_DATABASE.7 (+4/-4)
doc/src/sgml/man7/CREATE_DOMAIN.7 (+4/-4)
doc/src/sgml/man7/CREATE_EVENT_TRIGGER.7 (+4/-4)
doc/src/sgml/man7/CREATE_EXTENSION.7 (+4/-4)
doc/src/sgml/man7/CREATE_FOREIGN_DATA_WRAPPER.7 (+4/-4)
doc/src/sgml/man7/CREATE_FOREIGN_TABLE.7 (+4/-4)
doc/src/sgml/man7/CREATE_FUNCTION.7 (+4/-4)
doc/src/sgml/man7/CREATE_GROUP.7 (+4/-4)
doc/src/sgml/man7/CREATE_INDEX.7 (+4/-4)
doc/src/sgml/man7/CREATE_LANGUAGE.7 (+4/-4)
doc/src/sgml/man7/CREATE_MATERIALIZED_VIEW.7 (+4/-4)
doc/src/sgml/man7/CREATE_OPERATOR.7 (+4/-4)
doc/src/sgml/man7/CREATE_OPERATOR_CLASS.7 (+4/-4)
doc/src/sgml/man7/CREATE_OPERATOR_FAMILY.7 (+4/-4)
doc/src/sgml/man7/CREATE_POLICY.7 (+4/-4)
doc/src/sgml/man7/CREATE_PROCEDURE.7 (+4/-4)
doc/src/sgml/man7/CREATE_PUBLICATION.7 (+4/-4)
doc/src/sgml/man7/CREATE_ROLE.7 (+4/-4)
doc/src/sgml/man7/CREATE_RULE.7 (+4/-4)
doc/src/sgml/man7/CREATE_SCHEMA.7 (+4/-4)
doc/src/sgml/man7/CREATE_SEQUENCE.7 (+4/-4)
doc/src/sgml/man7/CREATE_SERVER.7 (+4/-4)
doc/src/sgml/man7/CREATE_STATISTICS.7 (+4/-4)
doc/src/sgml/man7/CREATE_SUBSCRIPTION.7 (+4/-4)
doc/src/sgml/man7/CREATE_TABLE.7 (+4/-4)
doc/src/sgml/man7/CREATE_TABLESPACE.7 (+4/-4)
doc/src/sgml/man7/CREATE_TABLE_AS.7 (+4/-4)
doc/src/sgml/man7/CREATE_TEXT_SEARCH_CONFIGURATION.7 (+4/-4)
doc/src/sgml/man7/CREATE_TEXT_SEARCH_DICTIONARY.7 (+4/-4)
doc/src/sgml/man7/CREATE_TEXT_SEARCH_PARSER.7 (+4/-4)
doc/src/sgml/man7/CREATE_TEXT_SEARCH_TEMPLATE.7 (+4/-4)
doc/src/sgml/man7/CREATE_TRANSFORM.7 (+4/-4)
doc/src/sgml/man7/CREATE_TRIGGER.7 (+4/-4)
doc/src/sgml/man7/CREATE_TYPE.7 (+4/-4)
doc/src/sgml/man7/CREATE_USER.7 (+4/-4)
doc/src/sgml/man7/CREATE_USER_MAPPING.7 (+4/-4)
doc/src/sgml/man7/CREATE_VIEW.7 (+4/-4)
doc/src/sgml/man7/DEALLOCATE.7 (+4/-4)
doc/src/sgml/man7/DECLARE.7 (+4/-4)
doc/src/sgml/man7/DELETE.7 (+4/-4)
doc/src/sgml/man7/DISCARD.7 (+4/-4)
doc/src/sgml/man7/DO.7 (+4/-4)
doc/src/sgml/man7/DROP_ACCESS_METHOD.7 (+4/-4)
doc/src/sgml/man7/DROP_AGGREGATE.7 (+4/-4)
doc/src/sgml/man7/DROP_CAST.7 (+4/-4)
doc/src/sgml/man7/DROP_COLLATION.7 (+4/-4)
doc/src/sgml/man7/DROP_CONVERSION.7 (+4/-4)
doc/src/sgml/man7/DROP_DATABASE.7 (+4/-4)
doc/src/sgml/man7/DROP_DOMAIN.7 (+4/-4)
doc/src/sgml/man7/DROP_EVENT_TRIGGER.7 (+4/-4)
doc/src/sgml/man7/DROP_EXTENSION.7 (+4/-4)
doc/src/sgml/man7/DROP_FOREIGN_DATA_WRAPPER.7 (+4/-4)
doc/src/sgml/man7/DROP_FOREIGN_TABLE.7 (+4/-4)
doc/src/sgml/man7/DROP_FUNCTION.7 (+4/-4)
doc/src/sgml/man7/DROP_GROUP.7 (+4/-4)
doc/src/sgml/man7/DROP_INDEX.7 (+4/-4)
doc/src/sgml/man7/DROP_LANGUAGE.7 (+4/-4)
doc/src/sgml/man7/DROP_MATERIALIZED_VIEW.7 (+4/-4)
doc/src/sgml/man7/DROP_OPERATOR.7 (+4/-4)
doc/src/sgml/man7/DROP_OPERATOR_CLASS.7 (+4/-4)
doc/src/sgml/man7/DROP_OPERATOR_FAMILY.7 (+4/-4)
doc/src/sgml/man7/DROP_OWNED.7 (+4/-4)
doc/src/sgml/man7/DROP_POLICY.7 (+4/-4)
doc/src/sgml/man7/DROP_PROCEDURE.7 (+4/-4)
doc/src/sgml/man7/DROP_PUBLICATION.7 (+4/-4)
doc/src/sgml/man7/DROP_ROLE.7 (+4/-4)
doc/src/sgml/man7/DROP_ROUTINE.7 (+4/-4)
doc/src/sgml/man7/DROP_RULE.7 (+4/-4)
doc/src/sgml/man7/DROP_SCHEMA.7 (+4/-4)
doc/src/sgml/man7/DROP_SEQUENCE.7 (+4/-4)
doc/src/sgml/man7/DROP_SERVER.7 (+4/-4)
doc/src/sgml/man7/DROP_STATISTICS.7 (+4/-4)
doc/src/sgml/man7/DROP_SUBSCRIPTION.7 (+4/-4)
doc/src/sgml/man7/DROP_TABLE.7 (+4/-4)
doc/src/sgml/man7/DROP_TABLESPACE.7 (+4/-4)
doc/src/sgml/man7/DROP_TEXT_SEARCH_CONFIGURATION.7 (+4/-4)
doc/src/sgml/man7/DROP_TEXT_SEARCH_DICTIONARY.7 (+4/-4)
doc/src/sgml/man7/DROP_TEXT_SEARCH_PARSER.7 (+4/-4)
doc/src/sgml/man7/DROP_TEXT_SEARCH_TEMPLATE.7 (+4/-4)
doc/src/sgml/man7/DROP_TRANSFORM.7 (+4/-4)
doc/src/sgml/man7/DROP_TRIGGER.7 (+4/-4)
doc/src/sgml/man7/DROP_TYPE.7 (+4/-4)
doc/src/sgml/man7/DROP_USER.7 (+4/-4)
doc/src/sgml/man7/DROP_USER_MAPPING.7 (+4/-4)
doc/src/sgml/man7/DROP_VIEW.7 (+4/-4)
doc/src/sgml/man7/END.7 (+4/-4)
doc/src/sgml/man7/EXECUTE.7 (+4/-4)
doc/src/sgml/man7/EXPLAIN.7 (+4/-4)
doc/src/sgml/man7/FETCH.7 (+4/-4)
doc/src/sgml/man7/GRANT.7 (+4/-4)
doc/src/sgml/man7/IMPORT_FOREIGN_SCHEMA.7 (+4/-4)
doc/src/sgml/man7/INSERT.7 (+4/-4)
doc/src/sgml/man7/LISTEN.7 (+4/-4)
doc/src/sgml/man7/LOAD.7 (+4/-4)
doc/src/sgml/man7/LOCK.7 (+4/-4)
doc/src/sgml/man7/MOVE.7 (+4/-4)
doc/src/sgml/man7/NOTIFY.7 (+4/-4)
doc/src/sgml/man7/PREPARE.7 (+4/-4)
doc/src/sgml/man7/PREPARE_TRANSACTION.7 (+4/-4)
doc/src/sgml/man7/REASSIGN_OWNED.7 (+4/-4)
doc/src/sgml/man7/REFRESH_MATERIALIZED_VIEW.7 (+4/-4)
doc/src/sgml/man7/REINDEX.7 (+4/-4)
doc/src/sgml/man7/RELEASE_SAVEPOINT.7 (+4/-4)
doc/src/sgml/man7/RESET.7 (+4/-4)
doc/src/sgml/man7/REVOKE.7 (+4/-4)
doc/src/sgml/man7/ROLLBACK.7 (+4/-4)
doc/src/sgml/man7/ROLLBACK_PREPARED.7 (+4/-4)
doc/src/sgml/man7/ROLLBACK_TO_SAVEPOINT.7 (+4/-4)
doc/src/sgml/man7/SAVEPOINT.7 (+4/-4)
doc/src/sgml/man7/SECURITY_LABEL.7 (+4/-4)
doc/src/sgml/man7/SELECT.7 (+4/-4)
doc/src/sgml/man7/SELECT_INTO.7 (+4/-4)
doc/src/sgml/man7/SET.7 (+4/-4)
doc/src/sgml/man7/SET_CONSTRAINTS.7 (+4/-4)
doc/src/sgml/man7/SET_ROLE.7 (+4/-4)
doc/src/sgml/man7/SET_SESSION_AUTHORIZATION.7 (+4/-4)
doc/src/sgml/man7/SET_TRANSACTION.7 (+4/-4)
doc/src/sgml/man7/SHOW.7 (+4/-4)
doc/src/sgml/man7/START_TRANSACTION.7 (+4/-4)
doc/src/sgml/man7/TRUNCATE.7 (+4/-4)
doc/src/sgml/man7/UNLISTEN.7 (+4/-4)
doc/src/sgml/man7/UPDATE.7 (+4/-4)
doc/src/sgml/man7/VACUUM.7 (+4/-4)
doc/src/sgml/man7/VALUES.7 (+4/-4)
doc/src/sgml/monitoring.sgml (+5/-0)
doc/src/sgml/postgres-fdw.sgml (+4/-3)
doc/src/sgml/ref/alter_materialized_view.sgml (+1/-0)
doc/src/sgml/ref/alter_table.sgml (+5/-4)
doc/src/sgml/ref/analyze.sgml (+29/-3)
doc/src/sgml/ref/pg_rewind.sgml (+2/-2)
doc/src/sgml/ref/pgupgrade.sgml (+1/-2)
doc/src/sgml/release-13.sgml (+985/-0)
doc/src/sgml/runtime.sgml (+4/-4)
doc/src/sgml/textsearch.sgml (+8/-2)
src/backend/access/brin/brin.c (+28/-1)
src/backend/access/heap/heapam.c (+151/-72)
src/backend/access/heap/heapam_handler.c (+7/-8)
src/backend/access/heap/heapam_visibility.c (+2/-2)
src/backend/access/nbtree/nbtdedup.c (+1/-1)
src/backend/access/transam/clog.c (+3/-2)
src/backend/access/transam/twophase.c (+3/-0)
src/backend/access/transam/xact.c (+4/-2)
src/backend/access/transam/xlog.c (+22/-7)
src/backend/bootstrap/bootparse.c (+588/-675)
src/backend/catalog/index.c (+51/-14)
src/backend/catalog/namespace.c (+3/-0)
src/backend/catalog/storage.c (+28/-1)
src/backend/commands/cluster.c (+26/-11)
src/backend/commands/copy.c (+1/-1)
src/backend/commands/functioncmds.c (+3/-2)
src/backend/commands/indexcmds.c (+85/-13)
src/backend/commands/matview.c (+11/-19)
src/backend/commands/tablecmds.c (+43/-18)
src/backend/executor/execExpr.c (+4/-4)
src/backend/executor/execExprInterp.c (+33/-39)
src/backend/executor/execTuples.c (+13/-24)
src/backend/executor/nodeIndexscan.c (+5/-1)
src/backend/jit/llvm/Makefile (+6/-0)
src/backend/jit/llvm/llvmjit_error.cpp (+30/-5)
src/backend/jit/llvm/llvmjit_inline.cpp (+11/-1)
src/backend/libpq/be-secure-common.c (+13/-15)
src/backend/nodes/copyfuncs.c (+21/-33)
src/backend/nodes/nodeFuncs.c (+2/-0)
src/backend/optimizer/path/allpaths.c (+2/-1)
src/backend/optimizer/path/costsize.c (+6/-0)
src/backend/optimizer/plan/createplan.c (+18/-1)
src/backend/optimizer/plan/subselect.c (+19/-19)
src/backend/parser/analyze.c (+7/-14)
src/backend/parser/gram.c (+10085/-9631)
src/backend/parser/gram.h (+486/-481)
src/backend/parser/parse_utilcmd.c (+2/-1)
src/backend/po/de.po (+726/-716)
src/backend/po/fr.po (+642/-632)
src/backend/po/ru.po (+728/-718)
src/backend/po/sv.po (+894/-874)
src/backend/postmaster/pgstat.c (+3/-0)
src/backend/postmaster/postmaster.c (+1/-1)
src/backend/replication/logical/launcher.c (+4/-4)
src/backend/replication/pgoutput/pgoutput.c (+40/-6)
src/backend/replication/repl_gram.c (+594/-672)
src/backend/replication/syncrep_gram.c (+370/-496)
src/backend/storage/buffer/bufmgr.c (+3/-1)
src/backend/storage/ipc/latch.c (+1/-1)
src/backend/storage/ipc/procarray.c (+84/-18)
src/backend/storage/ipc/shm_mq.c (+5/-2)
src/backend/storage/ipc/standby.c (+12/-10)
src/backend/storage/lmgr/proc.c (+2/-2)
src/backend/storage/sync/sync.c (+16/-2)
src/backend/tcop/postgres.c (+11/-1)
src/backend/utils/adt/jsonpath_gram.c (+905/-663)
src/backend/utils/adt/numeric.c (+8/-0)
src/backend/utils/adt/ruleutils.c (+7/-3)
src/backend/utils/adt/xml.c (+2/-2)
src/backend/utils/cache/inval.c (+1/-1)
src/backend/utils/cache/relcache.c (+1/-1)
src/backend/utils/init/miscinit.c (+20/-15)
src/backend/utils/misc/guc.c (+1/-1)
src/backend/utils/misc/ps_status.c (+1/-0)
src/backend/utils/sort/tuplesort.c (+3/-1)
src/backend/utils/time/snapmgr.c (+6/-4)
src/bin/initdb/po/ru.po (+9/-9)
src/bin/initdb/po/sv.po (+1/-1)
src/bin/pg_archivecleanup/po/sv.po (+1/-1)
src/bin/pg_basebackup/po/sv.po (+152/-147)
src/bin/pg_basebackup/t/010_pg_basebackup.pl (+11/-22)
src/bin/pg_checksums/po/sv.po (+1/-1)
src/bin/pg_checksums/t/002_actions.pl (+2/-8)
src/bin/pg_config/po/ru.po (+9/-9)
src/bin/pg_config/po/sv.po (+1/-1)
src/bin/pg_controldata/po/sv.po (+1/-1)
src/bin/pg_ctl/pg_ctl.c (+80/-48)
src/bin/pg_ctl/po/ru.po (+151/-151)
src/bin/pg_ctl/po/sv.po (+143/-143)
src/bin/pg_ctl/t/001_start_stop.pl (+1/-10)
src/bin/pg_ctl/t/004_logrotate.pl (+1/-1)
src/bin/pg_dump/Makefile (+1/-1)
src/bin/pg_dump/po/ru.po (+9/-9)
src/bin/pg_dump/po/sv.po (+223/-203)
src/bin/pg_dump/t/002_pg_dump.pl (+2/-1)
src/bin/pg_resetwal/po/sv.po (+1/-1)
src/bin/pg_rewind/parsexlog.c (+5/-1)
src/bin/pg_rewind/po/de.po (+83/-78)
src/bin/pg_rewind/po/fr.po (+234/-229)
src/bin/pg_rewind/po/ru.po (+20/-14)
src/bin/pg_rewind/po/sv.po (+19/-14)
src/bin/pg_rewind/t/RewindTest.pm (+0/-1)
src/bin/pg_test_fsync/po/sv.po (+1/-1)
src/bin/pg_test_timing/po/sv.po (+1/-1)
src/bin/pg_upgrade/po/sv.po (+1/-1)
src/bin/pg_verifybackup/po/sv.po (+1/-1)
src/bin/pg_verifybackup/t/003_corruption.pl (+2/-2)
src/bin/pg_waldump/pg_waldump.c (+6/-9)
src/bin/pg_waldump/po/ru.po (+47/-47)
src/bin/pg_waldump/po/sv.po (+1/-1)
src/bin/pgbench/exprparse.c (+576/-667)
src/bin/pgbench/t/001_pgbench_with_server.pl (+1/-3)
src/bin/psql/po/ru.po (+765/-764)
src/bin/psql/po/sv.po (+222/-222)
src/bin/psql/sql_help.c (+3/-1)
src/bin/psql/t/010_tab_completion.pl (+3/-3)
src/bin/scripts/po/ru.po (+5/-5)
src/bin/scripts/po/sv.po (+3/-3)
src/bin/scripts/t/080_pg_isready.pl (+2/-2)
src/common/exec.c (+5/-0)
src/fe_utils/print.c (+2/-1)
src/include/access/heapam.h (+3/-0)
src/include/nodes/pathnodes.h (+2/-1)
src/include/pg_config.h.in (+3/-0)
src/include/pgstat.h (+2/-1)
src/include/storage/block.h (+1/-1)
src/include/storage/proc.h (+8/-0)
src/include/storage/procarray.h (+5/-1)
src/include/utils/rel.h (+0/-1)
src/include/utils/relptr.h (+15/-2)
src/interfaces/ecpg/Makefile (+1/-0)
src/interfaces/ecpg/ecpglib/po/sv.po (+1/-1)
src/interfaces/ecpg/preproc/po/sv.po (+1/-1)
src/interfaces/ecpg/preproc/preproc.c (+14641/-14014)
src/interfaces/ecpg/preproc/preproc.h (+556/-551)
src/interfaces/libpq/fe-connect.c (+5/-0)
src/interfaces/libpq/fe-exec.c (+7/-3)
src/interfaces/libpq/fe-secure-openssl.c (+38/-4)
src/interfaces/libpq/po/de.po (+129/-119)
src/interfaces/libpq/po/fr.po (+137/-123)
src/interfaces/libpq/po/ru.po (+139/-124)
src/interfaces/libpq/po/sv.po (+131/-121)
src/pl/plperl/GNUmakefile (+1/-1)
src/pl/plperl/plperl.c (+31/-2)
src/pl/plperl/po/ru.po (+44/-44)
src/pl/plperl/po/sv.po (+44/-44)
src/pl/plperl/ppport.h (+8/-0)
src/pl/plpgsql/src/pl_gram.c (+1194/-1342)
src/pl/plpgsql/src/pl_gram.h (+142/-137)
src/pl/plpgsql/src/po/sv.po (+1/-1)
src/pl/plpython/Makefile (+1/-1)
src/pl/plpython/po/sv.po (+1/-1)
src/pl/tcl/Makefile (+1/-1)
src/pl/tcl/po/sv.po (+1/-1)
src/test/isolation/expected/partition-drop-index-locking.out (+100/-0)
src/test/isolation/expected/temp-schema-cleanup.out (+115/-0)
src/test/isolation/isolation_schedule (+2/-0)
src/test/isolation/specparse.c (+472/-580)
src/test/isolation/specs/partition-drop-index-locking.spec (+47/-0)
src/test/isolation/specs/temp-schema-cleanup.spec (+85/-0)
src/test/perl/PostgreSQL/Test/Cluster.pm (+16/-0)
src/test/perl/PostgreSQL/Test/Utils.pm (+46/-0)
src/test/perl/PostgresNode.pm (+97/-26)
src/test/perl/TestLib.pm (+77/-42)
src/test/recovery/t/002_archiving.pl (+25/-3)
src/test/recovery/t/003_recovery_targets.pl (+2/-2)
src/test/recovery/t/006_logical_decoding.pl (+2/-2)
src/test/recovery/t/010_logical_decoding_timelines.pl (+2/-2)
src/test/recovery/t/013_crash_restart.pl (+11/-37)
src/test/recovery/t/014_unlogged_reinit.pl (+1/-3)
src/test/recovery/t/017_shm.pl (+8/-7)
src/test/recovery/t/018_wal_optimize.pl (+0/-2)
src/test/recovery/t/019_replslot_limit.pl (+1/-1)
src/test/recovery/t/025_stuck_on_old_timeline.pl (+1/-1)
src/test/recovery/t/026_overwrite_contrecord.pl (+4/-1)
src/test/recovery/t/031_recovery_conflict.pl (+377/-0)
src/test/recovery/t/cp_history_files (+0/-7)
src/test/regress/expected/cluster.out (+14/-0)
src/test/regress/expected/create_index.out (+27/-0)
src/test/regress/expected/gist.out (+16/-0)
src/test/regress/expected/groupingsets.out (+45/-0)
src/test/regress/expected/privileges.out (+74/-0)
src/test/regress/expected/rowtypes.out (+2/-21)
src/test/regress/expected/select.out (+7/-0)
src/test/regress/expected/timestamp.out (+60/-0)
src/test/regress/expected/timestamptz.out (+60/-0)
src/test/regress/expected/vacuum.out (+3/-3)
src/test/regress/expected/with.out (+64/-0)
src/test/regress/expected/xmlmap.out (+496/-432)
src/test/regress/expected/xmlmap_1.out (+8/-2)
src/test/regress/pg_regress.c (+8/-2)
src/test/regress/sql/cluster.sql (+6/-0)
src/test/regress/sql/create_index.sql (+4/-0)
src/test/regress/sql/gist.sql (+5/-0)
src/test/regress/sql/groupingsets.sql (+9/-0)
src/test/regress/sql/privileges.sql (+64/-0)
src/test/regress/sql/rowtypes.sql (+2/-4)
src/test/regress/sql/select.sql (+5/-0)
src/test/regress/sql/timestamp.sql (+14/-0)
src/test/regress/sql/timestamptz.sql (+14/-0)
src/test/regress/sql/vacuum.sql (+3/-3)
src/test/regress/sql/with.sql (+31/-0)
src/test/regress/sql/xmlmap.sql (+8/-2)
src/test/ssl/t/001_ssltests.pl (+15/-10)
src/test/subscription/t/013_partition.pl (+56/-2)
src/timezone/data/tzdata.zi (+18/-16)
src/tools/msvc/Solution.pm (+1/-0)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior (community) Approve
Canonical Server packageset reviewers Pending
Review via email: mp+422738@code.launchpad.net

Description of the change

MRE for LP: #1973627

Note that this should be pushed through the security pocket.

PPA: https://launchpad.net/~athos-ribeiro/+archive/ubuntu/lp1973627-postgres-202205-mre/+packages

local autopkgtest run:

autopkgtest [14:48:44]: @@@@@@@@@@@@@@@@@@@@ summary
run-testsuite PASS
installcheck PASS

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

I'm taking a look at this one.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the MP, Athos.

I'll leave my review notes in this comment (instead of inline) because not all changes are visible in the MP diff.

- d/changelog: LGTM, but the "+" items need to be indented further right (2 spaces).

Otherwise, it LGTM. I've created the following bileto ticket and uploaded the package there:

https://bileto.ubuntu.com/#/ticket/4846

As I mentioned before, bileto was having problems with autopkgtest triggers last time I used it. Hopefully it'll work now.

I'm approving this MP but let's take a look at the autopkgtest results before we upload the package.

review: Approve
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thanks, Sergio.

I fixed the changelog and force-pushed the changes here :)

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks, Athos.

Good news: bileto is running the dep8 tests:

https://bileto.ubuntu.com/excuses/4846/impish.html

Let's take a look tomorrow and see how well they performed :-).

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

None of the failures present in the related bileto ticket are regressions. We are clear to proceed here.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.gitrevision b/.gitrevision
2index 9dd36ad..c859a8e 100644
3--- a/.gitrevision
4+++ b/.gitrevision
5@@ -1 +1 @@
6-d7db9572070a627bae9919fd1b4e16c8208d4fca
7+4695fdb40fbb1e977e7e62f7d9af1fa948230d6a
8diff --git a/INSTALL b/INSTALL
9index 62ce0b9..1cf7dff 100644
10--- a/INSTALL
11+++ b/INSTALL
12@@ -1,4 +1,3 @@
13-
14 PostgreSQL Installation from Source Code
15
16 ------------------------------------------------------------------------
17@@ -12,7 +11,6 @@ with Microsoft's Visual C++, see the main documentation instead.
18
19 ------------------------------------------------------------------------
20
21-
22 Short Version
23
24 ./configure
25@@ -32,7 +30,6 @@ The long version is the rest of this document.
26
27 ------------------------------------------------------------------------
28
29-
30 Requirements
31
32 In general, a modern Unix-compatible platform should be able to run
33@@ -164,10 +161,9 @@ the "df" command to check free disk space.
34
35 ------------------------------------------------------------------------
36
37-
38 Installation Procedure
39
40-1. CONFIGURATION
41+1. Configuration
42
43 The first step of the installation procedure is to configure the
44 source tree for your system and choose the options you would like.
45@@ -206,7 +202,7 @@ Installation Procedure
46 described in the section called "configure Environment Variables".
47 These provide additional ways to customize the configuration.
48
49-2. BUILD
50+2. Build
51
52 To start the build, type either of:
53
54@@ -238,7 +234,7 @@ Installation Procedure
55 Failure to do that can lead to strange error messages, typically
56 about missing header files.
57
58-3. REGRESSION TESTS
59+3. Regression Tests
60
61 If you want to test the newly built server before you install it,
62 you can run the regression tests at this point. The regression tests
63@@ -252,9 +248,9 @@ Installation Procedure
64 information about interpreting the test results. You can repeat this
65 test at any later time by issuing the same command.
66
67-4. INSTALLING THE FILES
68+4. Installing the Files
69
70- NOTE:
71+ Note:
72
73 If you are upgrading an existing system be sure to read the
74 documentation, which has instructions about upgrading a cluster.
75@@ -301,7 +297,7 @@ Installation Procedure
76 command was needed for the latter, but this step has been folded
77 into the standard install.)
78
79- CLIENT-ONLY INSTALLATION: If you want to install only the client
80+ Client-only installation: If you want to install only the client
81 applications and interface libraries, then you can use these
82 commands:
83
84@@ -313,10 +309,10 @@ Installation Procedure
85 "src/bin" has a few binaries for server-only use, but they are
86 small.
87
88-UNINSTALLATION: To undo the installation use the command "make
89+Uninstallation: To undo the installation use the command "make
90 uninstall". However, this will not remove any created directories.
91
92-CLEANING: After the installation you can free disk space by removing
93+Cleaning: After the installation you can free disk space by removing
94 the built files from the source tree with the command "make clean". This
95 will preserve the files made by the "configure" program, so that you can
96 rebuild everything with "make" later on. To reset the source tree to the
97@@ -426,7 +422,7 @@ restriction.) For relocatable installs, you might want to use the
98 The HTML-formatted documentation for PostgreSQL will be installed
99 under this directory. The default is "DATAROOTDIR".
100
101-NOTE:
102+Note:
103
104 Care has been taken to make it possible to install PostgreSQL into
105 shared installation locations (such as "/usr/local/include") without
106@@ -1018,7 +1014,7 @@ or
107 export COPT='-Werror'
108 make
109
110-NOTE:
111+Note:
112
113 If using GCC, it is best to build with an optimization level of at least
114 "-O1", because using no optimization ("-O0") disables some important
115@@ -1036,7 +1032,6 @@ one-time flag adjustments, while COPT might be kept set all the time.
116
117 ------------------------------------------------------------------------
118
119-
120 Post-Installation Setup
121
122 ------------------------------------------------------------------------
123@@ -1130,7 +1125,6 @@ communicated via command line options to most client programs.
124
125 ------------------------------------------------------------------------
126
127-
128 Getting Started
129
130 The following is a quick summary of how to get PostgreSQL up and running
131@@ -1186,7 +1180,6 @@ once installed. The main documentation contains more information.
132
133 ------------------------------------------------------------------------
134
135-
136 What Now?
137
138 - The PostgreSQL distribution contains a comprehensive documentation
139@@ -1221,7 +1214,6 @@ What Now?
140
141 ------------------------------------------------------------------------
142
143-
144 Supported Platforms
145
146 A platform (that is, a CPU architecture and operating system
147@@ -1260,7 +1252,6 @@ the appropriate place to discuss that.
148
149 ------------------------------------------------------------------------
150
151-
152 Platform-Specific Notes
153
154 This section documents additional platform-specific issues regarding the
155diff --git a/config/c-compiler.m4 b/config/c-compiler.m4
156index 780e906..d3562d6 100644
157--- a/config/c-compiler.m4
158+++ b/config/c-compiler.m4
159@@ -381,6 +381,28 @@ fi])# PGAC_CHECK_BUILTIN_FUNC
160
161
162
163+# PGAC_CHECK_BUILTIN_FUNC_PTR
164+# -----------------------
165+# Like PGAC_CHECK_BUILTIN_FUNC, except that the function is assumed to
166+# return a pointer type, and the argument(s) should be given literally.
167+# This handles some cases that PGAC_CHECK_BUILTIN_FUNC doesn't.
168+AC_DEFUN([PGAC_CHECK_BUILTIN_FUNC_PTR],
169+[AC_CACHE_CHECK(for $1, pgac_cv$1,
170+[AC_LINK_IFELSE([AC_LANG_PROGRAM([
171+void *
172+call$1(void)
173+{
174+ return $1($2);
175+}], [])],
176+[pgac_cv$1=yes],
177+[pgac_cv$1=no])])
178+if test x"${pgac_cv$1}" = xyes ; then
179+AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE$1]), 1,
180+ [Define to 1 if your compiler understands $1.])
181+fi])# PGAC_CHECK_BUILTIN_FUNC_PTR
182+
183+
184+
185 # PGAC_PROG_VARCC_VARFLAGS_OPT
186 # ----------------------------
187 # Given a compiler, variable name and a string, check if the compiler
188diff --git a/configure b/configure
189index 8568ffc..5aa24b1 100755
190--- a/configure
191+++ b/configure
192@@ -1,6 +1,6 @@
193 #! /bin/sh
194 # Guess values for system-dependent variables and create Makefiles.
195-# Generated by GNU Autoconf 2.69 for PostgreSQL 13.6.
196+# Generated by GNU Autoconf 2.69 for PostgreSQL 13.7.
197 #
198 # Report bugs to <pgsql-bugs@lists.postgresql.org>.
199 #
200@@ -582,8 +582,8 @@ MAKEFLAGS=
201 # Identity of this package.
202 PACKAGE_NAME='PostgreSQL'
203 PACKAGE_TARNAME='postgresql'
204-PACKAGE_VERSION='13.6'
205-PACKAGE_STRING='PostgreSQL 13.6'
206+PACKAGE_VERSION='13.7'
207+PACKAGE_STRING='PostgreSQL 13.7'
208 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
209 PACKAGE_URL='https://www.postgresql.org/'
210
211@@ -1436,7 +1436,7 @@ if test "$ac_init_help" = "long"; then
212 # Omit some internal or obsolete options to make the list less imposing.
213 # This message is too long to be a string in the A/UX 3.1 sh.
214 cat <<_ACEOF
215-\`configure' configures PostgreSQL 13.6 to adapt to many kinds of systems.
216+\`configure' configures PostgreSQL 13.7 to adapt to many kinds of systems.
217
218 Usage: $0 [OPTION]... [VAR=VALUE]...
219
220@@ -1501,7 +1501,7 @@ fi
221
222 if test -n "$ac_init_help"; then
223 case $ac_init_help in
224- short | recursive ) echo "Configuration of PostgreSQL 13.6:";;
225+ short | recursive ) echo "Configuration of PostgreSQL 13.7:";;
226 esac
227 cat <<\_ACEOF
228
229@@ -1668,7 +1668,7 @@ fi
230 test -n "$ac_init_help" && exit $ac_status
231 if $ac_init_version; then
232 cat <<\_ACEOF
233-PostgreSQL configure 13.6
234+PostgreSQL configure 13.7
235 generated by GNU Autoconf 2.69
236
237 Copyright (C) 2012 Free Software Foundation, Inc.
238@@ -2421,7 +2421,7 @@ cat >config.log <<_ACEOF
239 This file contains any messages produced by compilers while
240 running configure, to aid debugging if configure makes a mistake.
241
242-It was created by PostgreSQL $as_me 13.6, which was
243+It was created by PostgreSQL $as_me 13.7, which was
244 generated by GNU Autoconf 2.69. Invocation command line was
245
246 $ $0 $@
247@@ -11399,9 +11399,12 @@ if test "$ac_res" != no; then :
248
249 fi
250
251-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
252-$as_echo_n "checking for library containing dlopen... " >&6; }
253-if ${ac_cv_search_dlopen+:} false; then :
254+# gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
255+# when enabling asan the dlopen check doesn't notice that -ldl is actually
256+# required. Just checking for dlsym() ought to suffice.
257+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
258+$as_echo_n "checking for library containing dlsym... " >&6; }
259+if ${ac_cv_search_dlsym+:} false; then :
260 $as_echo_n "(cached) " >&6
261 else
262 ac_func_search_save_LIBS=$LIBS
263@@ -11414,11 +11417,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
264 #ifdef __cplusplus
265 extern "C"
266 #endif
267-char dlopen ();
268+char dlsym ();
269 int
270 main ()
271 {
272-return dlopen ();
273+return dlsym ();
274 ;
275 return 0;
276 }
277@@ -11431,25 +11434,25 @@ for ac_lib in '' dl; do
278 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
279 fi
280 if ac_fn_c_try_link "$LINENO"; then :
281- ac_cv_search_dlopen=$ac_res
282+ ac_cv_search_dlsym=$ac_res
283 fi
284 rm -f core conftest.err conftest.$ac_objext \
285 conftest$ac_exeext
286- if ${ac_cv_search_dlopen+:} false; then :
287+ if ${ac_cv_search_dlsym+:} false; then :
288 break
289 fi
290 done
291-if ${ac_cv_search_dlopen+:} false; then :
292+if ${ac_cv_search_dlsym+:} false; then :
293
294 else
295- ac_cv_search_dlopen=no
296+ ac_cv_search_dlsym=no
297 fi
298 rm conftest.$ac_ext
299 LIBS=$ac_func_search_save_LIBS
300 fi
301-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
302-$as_echo "$ac_cv_search_dlopen" >&6; }
303-ac_res=$ac_cv_search_dlopen
304+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
305+$as_echo "$ac_cv_search_dlsym" >&6; }
306+ac_res=$ac_cv_search_dlsym
307 if test "$ac_res" != no; then :
308 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
309
310@@ -15510,6 +15513,46 @@ cat >>confdefs.h <<_ACEOF
311 _ACEOF
312
313 fi
314+# __builtin_frame_address may draw a diagnostic for non-constant argument,
315+# so it needs a different test function.
316+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
317+$as_echo_n "checking for __builtin_frame_address... " >&6; }
318+if ${pgac_cv__builtin_frame_address+:} false; then :
319+ $as_echo_n "(cached) " >&6
320+else
321+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
322+/* end confdefs.h. */
323+
324+void *
325+call__builtin_frame_address(void)
326+{
327+ return __builtin_frame_address(0);
328+}
329+int
330+main ()
331+{
332+
333+ ;
334+ return 0;
335+}
336+_ACEOF
337+if ac_fn_c_try_link "$LINENO"; then :
338+ pgac_cv__builtin_frame_address=yes
339+else
340+ pgac_cv__builtin_frame_address=no
341+fi
342+rm -f core conftest.err conftest.$ac_objext \
343+ conftest$ac_exeext conftest.$ac_ext
344+fi
345+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
346+$as_echo "$pgac_cv__builtin_frame_address" >&6; }
347+if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
348+
349+cat >>confdefs.h <<_ACEOF
350+#define HAVE__BUILTIN_FRAME_ADDRESS 1
351+_ACEOF
352+
353+fi
354
355 # We require 64-bit fseeko() to be available, but run this check anyway
356 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
357@@ -19789,7 +19832,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
358 # report actual input values of CONFIG_FILES etc. instead of their
359 # values after options handling.
360 ac_log="
361-This file was extended by PostgreSQL $as_me 13.6, which was
362+This file was extended by PostgreSQL $as_me 13.7, which was
363 generated by GNU Autoconf 2.69. Invocation command line was
364
365 CONFIG_FILES = $CONFIG_FILES
366@@ -19860,7 +19903,7 @@ _ACEOF
367 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
368 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
369 ac_cs_version="\\
370-PostgreSQL config.status 13.6
371+PostgreSQL config.status 13.7
372 configured by $0, generated by GNU Autoconf 2.69,
373 with options \\"\$ac_cs_config\\"
374
375diff --git a/configure.in b/configure.in
376index 22afb11..253a92e 100644
377--- a/configure.in
378+++ b/configure.in
379@@ -17,7 +17,7 @@ dnl Read the Autoconf manual for details.
380 dnl
381 m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
382
383-AC_INIT([PostgreSQL], [13.6], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/])
384+AC_INIT([PostgreSQL], [13.7], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/])
385
386 m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
387 Untested combinations of 'autoconf' and PostgreSQL versions are not
388@@ -1178,7 +1178,10 @@ AC_SUBST(PTHREAD_LIBS)
389
390 AC_CHECK_LIB(m, main)
391 AC_SEARCH_LIBS(setproctitle, util)
392-AC_SEARCH_LIBS(dlopen, dl)
393+# gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
394+# when enabling asan the dlopen check doesn't notice that -ldl is actually
395+# required. Just checking for dlsym() ought to suffice.
396+AC_SEARCH_LIBS(dlsym, dl)
397 AC_SEARCH_LIBS(socket, [socket ws2_32])
398 AC_SEARCH_LIBS(shl_load, dld)
399 AC_SEARCH_LIBS(getopt_long, [getopt gnugetopt])
400@@ -1713,6 +1716,9 @@ PGAC_CHECK_BUILTIN_FUNC([__builtin_bswap64], [long int x])
401 PGAC_CHECK_BUILTIN_FUNC([__builtin_clz], [unsigned int x])
402 PGAC_CHECK_BUILTIN_FUNC([__builtin_ctz], [unsigned int x])
403 PGAC_CHECK_BUILTIN_FUNC([__builtin_popcount], [unsigned int x])
404+# __builtin_frame_address may draw a diagnostic for non-constant argument,
405+# so it needs a different test function.
406+PGAC_CHECK_BUILTIN_FUNC_PTR([__builtin_frame_address], [0])
407
408 # We require 64-bit fseeko() to be available, but run this check anyway
409 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
410diff --git a/contrib/amcheck/expected/check_btree.out b/contrib/amcheck/expected/check_btree.out
411index 13848b7..17d3d3f 100644
412--- a/contrib/amcheck/expected/check_btree.out
413+++ b/contrib/amcheck/expected/check_btree.out
414@@ -177,11 +177,34 @@ SELECT bt_index_check('toasty', true);
415
416 (1 row)
417
418+--
419+-- Check that index expressions and predicates are run as the table's owner
420+--
421+TRUNCATE bttest_a;
422+INSERT INTO bttest_a SELECT * FROM generate_series(1, 1000);
423+ALTER TABLE bttest_a OWNER TO regress_bttest_role;
424+-- A dummy index function checking current_user
425+CREATE FUNCTION ifun(int8) RETURNS int8 AS $$
426+BEGIN
427+ ASSERT current_user = 'regress_bttest_role',
428+ format('ifun(%s) called by %s', $1, current_user);
429+ RETURN $1;
430+END;
431+$$ LANGUAGE plpgsql IMMUTABLE;
432+CREATE INDEX bttest_a_expr_idx ON bttest_a ((ifun(id) + ifun(0)))
433+ WHERE ifun(id + 10) > ifun(10);
434+SELECT bt_index_check('bttest_a_expr_idx', true);
435+ bt_index_check
436+----------------
437+
438+(1 row)
439+
440 -- cleanup
441 DROP TABLE bttest_a;
442 DROP TABLE bttest_b;
443 DROP TABLE bttest_multi;
444 DROP TABLE delete_test_table;
445 DROP TABLE toast_bug;
446+DROP FUNCTION ifun(int8);
447 DROP OWNED BY regress_bttest_role; -- permissions
448 DROP ROLE regress_bttest_role;
449diff --git a/contrib/amcheck/sql/check_btree.sql b/contrib/amcheck/sql/check_btree.sql
450index 97a3e1a..033c04b 100644
451--- a/contrib/amcheck/sql/check_btree.sql
452+++ b/contrib/amcheck/sql/check_btree.sql
453@@ -115,11 +115,32 @@ INSERT INTO toast_bug SELECT repeat('a', 2200);
454 -- Should not get false positive report of corruption:
455 SELECT bt_index_check('toasty', true);
456
457+--
458+-- Check that index expressions and predicates are run as the table's owner
459+--
460+TRUNCATE bttest_a;
461+INSERT INTO bttest_a SELECT * FROM generate_series(1, 1000);
462+ALTER TABLE bttest_a OWNER TO regress_bttest_role;
463+-- A dummy index function checking current_user
464+CREATE FUNCTION ifun(int8) RETURNS int8 AS $$
465+BEGIN
466+ ASSERT current_user = 'regress_bttest_role',
467+ format('ifun(%s) called by %s', $1, current_user);
468+ RETURN $1;
469+END;
470+$$ LANGUAGE plpgsql IMMUTABLE;
471+
472+CREATE INDEX bttest_a_expr_idx ON bttest_a ((ifun(id) + ifun(0)))
473+ WHERE ifun(id + 10) > ifun(10);
474+
475+SELECT bt_index_check('bttest_a_expr_idx', true);
476+
477 -- cleanup
478 DROP TABLE bttest_a;
479 DROP TABLE bttest_b;
480 DROP TABLE bttest_multi;
481 DROP TABLE delete_test_table;
482 DROP TABLE toast_bug;
483+DROP FUNCTION ifun(int8);
484 DROP OWNED BY regress_bttest_role; -- permissions
485 DROP ROLE regress_bttest_role;
486diff --git a/contrib/amcheck/t/002_cic.pl b/contrib/amcheck/t/002_cic.pl
487index 832ae8f..3587807 100644
488--- a/contrib/amcheck/t/002_cic.pl
489+++ b/contrib/amcheck/t/002_cic.pl
490@@ -18,7 +18,8 @@ my ($node, $result);
491 #
492 $node = get_new_node('CIC_test');
493 $node->init;
494-$node->append_conf('postgresql.conf', 'lock_timeout = 180000');
495+$node->append_conf('postgresql.conf',
496+ 'lock_timeout = ' . (1000 * $TestLib::timeout_default));
497 $node->start;
498 $node->safe_psql('postgres', q(CREATE EXTENSION amcheck));
499 $node->safe_psql('postgres', q(CREATE TABLE tbl(i int)));
500diff --git a/contrib/amcheck/t/003_cic_2pc.pl b/contrib/amcheck/t/003_cic_2pc.pl
501index d81734f..445aaba 100644
502--- a/contrib/amcheck/t/003_cic_2pc.pl
503+++ b/contrib/amcheck/t/003_cic_2pc.pl
504@@ -11,7 +11,8 @@ use TestLib;
505
506 use Test::More tests => 5;
507
508-local $TODO = 'filesystem bug' if TestLib::has_wal_read_bug;
509+Test::More->builder->todo_start('filesystem bug')
510+ if TestLib::has_wal_read_bug;
511
512 my ($node, $result);
513
514@@ -21,7 +22,8 @@ my ($node, $result);
515 $node = get_new_node('CIC_2PC_test');
516 $node->init;
517 $node->append_conf('postgresql.conf', 'max_prepared_transactions = 10');
518-$node->append_conf('postgresql.conf', 'lock_timeout = 180000');
519+$node->append_conf('postgresql.conf',
520+ 'lock_timeout = ' . (1000 * $TestLib::timeout_default));
521 $node->start;
522 $node->safe_psql('postgres', q(CREATE EXTENSION amcheck));
523 $node->safe_psql('postgres', q(CREATE TABLE tbl(i int)));
524@@ -37,7 +39,7 @@ $node->safe_psql('postgres', q(CREATE TABLE tbl(i int)));
525
526 my $main_in = '';
527 my $main_out = '';
528-my $main_timer = IPC::Run::timeout(180);
529+my $main_timer = IPC::Run::timeout($TestLib::timeout_default);
530
531 my $main_h =
532 $node->background_psql('postgres', \$main_in, \$main_out,
533@@ -51,7 +53,7 @@ pump $main_h until $main_out =~ /syncpoint1/ || $main_timer->is_expired;
534
535 my $cic_in = '';
536 my $cic_out = '';
537-my $cic_timer = IPC::Run::timeout(180);
538+my $cic_timer = IPC::Run::timeout($TestLib::timeout_default);
539 my $cic_h =
540 $node->background_psql('postgres', \$cic_in, \$cic_out,
541 $cic_timer, on_error_stop => 1);
542@@ -112,9 +114,10 @@ PREPARE TRANSACTION 'persists_forever';
543 ));
544 $node->restart;
545
546-my $reindex_in = '';
547-my $reindex_out = '';
548-my $reindex_timer = IPC::Run::timeout(180);
549+my $reindex_in = '';
550+my $reindex_out = '';
551+my $reindex_timer =
552+ IPC::Run::timeout($TestLib::timeout_default);
553 my $reindex_h =
554 $node->background_psql('postgres', \$reindex_in, \$reindex_out,
555 $reindex_timer, on_error_stop => 1);
556diff --git a/contrib/amcheck/verify_nbtree.c b/contrib/amcheck/verify_nbtree.c
557index be833d2..1017d5a 100644
558--- a/contrib/amcheck/verify_nbtree.c
559+++ b/contrib/amcheck/verify_nbtree.c
560@@ -245,6 +245,9 @@ bt_index_check_internal(Oid indrelid, bool parentcheck, bool heapallindexed,
561 Relation indrel;
562 Relation heaprel;
563 LOCKMODE lockmode;
564+ Oid save_userid;
565+ int save_sec_context;
566+ int save_nestlevel;
567
568 if (parentcheck)
569 lockmode = ShareLock;
570@@ -261,9 +264,27 @@ bt_index_check_internal(Oid indrelid, bool parentcheck, bool heapallindexed,
571 */
572 heapid = IndexGetRelation(indrelid, true);
573 if (OidIsValid(heapid))
574+ {
575 heaprel = table_open(heapid, lockmode);
576+
577+ /*
578+ * Switch to the table owner's userid, so that any index functions are
579+ * run as that user. Also lock down security-restricted operations
580+ * and arrange to make GUC variable changes local to this command.
581+ */
582+ GetUserIdAndSecContext(&save_userid, &save_sec_context);
583+ SetUserIdAndSecContext(heaprel->rd_rel->relowner,
584+ save_sec_context | SECURITY_RESTRICTED_OPERATION);
585+ save_nestlevel = NewGUCNestLevel();
586+ }
587 else
588+ {
589 heaprel = NULL;
590+ /* for "gcc -Og" https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394 */
591+ save_userid = InvalidOid;
592+ save_sec_context = -1;
593+ save_nestlevel = -1;
594+ }
595
596 /*
597 * Open the target index relations separately (like relation_openrv(), but
598@@ -323,6 +344,12 @@ bt_index_check_internal(Oid indrelid, bool parentcheck, bool heapallindexed,
599 heapallindexed, rootdescend);
600 }
601
602+ /* Roll back any GUC changes executed by index functions */
603+ AtEOXact_GUC(false, save_nestlevel);
604+
605+ /* Restore userid and security context */
606+ SetUserIdAndSecContext(save_userid, save_sec_context);
607+
608 /*
609 * Release locks early. That's ok here because nothing in the called
610 * routines will trigger shared cache invalidations to be sent, so we can
611diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl
612index 3537041..86aee55 100644
613--- a/contrib/bloom/t/001_wal.pl
614+++ b/contrib/bloom/t/001_wal.pl
615@@ -3,7 +3,18 @@ use strict;
616 use warnings;
617 use PostgresNode;
618 use TestLib;
619-use Test::More tests => 31;
620+use Test::More;
621+
622+if (TestLib::has_wal_read_bug)
623+{
624+ # We'd prefer to use Test::More->builder->todo_start, but the bug causes
625+ # this test file to die(), not merely to fail.
626+ plan skip_all => 'filesystem bug';
627+}
628+else
629+{
630+ plan tests => 31;
631+}
632
633 my $node_master;
634 my $node_standby;
635diff --git a/contrib/cube/cubeparse.c b/contrib/cube/cubeparse.c
636index 95a05c7..273fbc1 100644
637--- a/contrib/cube/cubeparse.c
638+++ b/contrib/cube/cubeparse.c
639@@ -1,8 +1,8 @@
640-/* A Bison parser, made by GNU Bison 3.3.2. */
641+/* A Bison parser, made by GNU Bison 3.7.5. */
642
643 /* Bison implementation for Yacc-like parsers in C
644
645- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
646+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
647 Inc.
648
649 This program is free software: you can redistribute it and/or modify
650@@ -34,6 +34,10 @@
651 /* C LALR(1) parser skeleton written by Richard Stallman, by
652 simplifying the original so-called "semantic" parser. */
653
654+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
655+ especially those whose name start with YY_ or yy_. They are
656+ private implementation details that can be changed or removed. */
657+
658 /* All symbols defined below should begin with yy or YY, to avoid
659 infringing on user name space. This should be done even for local
660 variables, as they might otherwise be expanded by user macros.
661@@ -41,14 +45,11 @@
662 define necessary library symbols; they are noted "INFRINGES ON
663 USER NAME SPACE" below. */
664
665-/* Undocumented macros, especially those whose name start with YY_,
666- are private implementation details. Do not rely on them. */
667-
668-/* Identify Bison output. */
669-#define YYBISON 1
670+/* Identify Bison output, and Bison version. */
671+#define YYBISON 30705
672
673-/* Bison version. */
674-#define YYBISON_VERSION "3.3.2"
675+/* Bison version string. */
676+#define YYBISON_VERSION "3.7.5"
677
678 /* Skeleton name. */
679 #define YYSKELETON_NAME "yacc.c"
680@@ -69,12 +70,11 @@
681 #define yyerror cube_yyerror
682 #define yydebug cube_yydebug
683 #define yynerrs cube_yynerrs
684-
685 #define yylval cube_yylval
686 #define yychar cube_yychar
687
688 /* First part of user prologue. */
689-#line 1 "cubeparse.y" /* yacc.c:337 */
690+#line 1 "cubeparse.y"
691
692 /* contrib/cube/cubeparse.y */
693
694@@ -108,7 +108,17 @@ static NDBOX *write_box(int dim, char *str1, char *str2);
695 static NDBOX *write_point_as_box(int dim, char *str);
696
697
698-#line 112 "cubeparse.c" /* yacc.c:337 */
699+#line 112 "cubeparse.c"
700+
701+# ifndef YY_CAST
702+# ifdef __cplusplus
703+# define YY_CAST(Type, Val) static_cast<Type> (Val)
704+# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
705+# else
706+# define YY_CAST(Type, Val) ((Type) (Val))
707+# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
708+# endif
709+# endif
710 # ifndef YY_NULLPTR
711 # if defined __cplusplus
712 # if 201103L <= __cplusplus
713@@ -121,14 +131,6 @@ static NDBOX *write_point_as_box(int dim, char *str);
714 # endif
715 # endif
716
717-/* Enabling verbose error messages. */
718-#ifdef YYERROR_VERBOSE
719-# undef YYERROR_VERBOSE
720-# define YYERROR_VERBOSE 1
721-#else
722-# define YYERROR_VERBOSE 0
723-#endif
724-
725
726 /* Debug traces. */
727 #ifndef YYDEBUG
728@@ -138,18 +140,23 @@ static NDBOX *write_point_as_box(int dim, char *str);
729 extern int cube_yydebug;
730 #endif
731
732-/* Token type. */
733+/* Token kinds. */
734 #ifndef YYTOKENTYPE
735 # define YYTOKENTYPE
736 enum yytokentype
737 {
738- CUBEFLOAT = 258,
739- O_PAREN = 259,
740- C_PAREN = 260,
741- O_BRACKET = 261,
742- C_BRACKET = 262,
743- COMMA = 263
744+ YYEMPTY = -2,
745+ YYEOF = 0, /* "end of file" */
746+ YYerror = 256, /* error */
747+ YYUNDEF = 257, /* "invalid token" */
748+ CUBEFLOAT = 258, /* CUBEFLOAT */
749+ O_PAREN = 259, /* O_PAREN */
750+ C_PAREN = 260, /* C_PAREN */
751+ O_BRACKET = 261, /* O_BRACKET */
752+ C_BRACKET = 262, /* C_BRACKET */
753+ COMMA = 263 /* COMMA */
754 };
755+ typedef enum yytokentype yytoken_kind_t;
756 #endif
757
758 /* Value type. */
759@@ -165,6 +172,26 @@ extern YYSTYPE cube_yylval;
760 int cube_yyparse (NDBOX **result);
761
762
763+/* Symbol kind. */
764+enum yysymbol_kind_t
765+{
766+ YYSYMBOL_YYEMPTY = -2,
767+ YYSYMBOL_YYEOF = 0, /* "end of file" */
768+ YYSYMBOL_YYerror = 1, /* error */
769+ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
770+ YYSYMBOL_CUBEFLOAT = 3, /* CUBEFLOAT */
771+ YYSYMBOL_O_PAREN = 4, /* O_PAREN */
772+ YYSYMBOL_C_PAREN = 5, /* C_PAREN */
773+ YYSYMBOL_O_BRACKET = 6, /* O_BRACKET */
774+ YYSYMBOL_C_BRACKET = 7, /* C_BRACKET */
775+ YYSYMBOL_COMMA = 8, /* COMMA */
776+ YYSYMBOL_YYACCEPT = 9, /* $accept */
777+ YYSYMBOL_box = 10, /* box */
778+ YYSYMBOL_paren_list = 11, /* paren_list */
779+ YYSYMBOL_list = 12 /* list */
780+};
781+typedef enum yysymbol_kind_t yysymbol_kind_t;
782+
783
784
785
786@@ -172,28 +199,87 @@ int cube_yyparse (NDBOX **result);
787 # undef short
788 #endif
789
790-#ifdef YYTYPE_UINT8
791-typedef YYTYPE_UINT8 yytype_uint8;
792-#else
793-typedef unsigned char yytype_uint8;
794+/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
795+ <limits.h> and (if available) <stdint.h> are included
796+ so that the code can choose integer types of a good width. */
797+
798+#ifndef __PTRDIFF_MAX__
799+# include <limits.h> /* INFRINGES ON USER NAME SPACE */
800+# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
801+# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
802+# define YY_STDINT_H
803+# endif
804 #endif
805
806-#ifdef YYTYPE_INT8
807-typedef YYTYPE_INT8 yytype_int8;
808+/* Narrow types that promote to a signed type and that can represent a
809+ signed or unsigned integer of at least N bits. In tables they can
810+ save space and decrease cache pressure. Promoting to a signed type
811+ helps avoid bugs in integer arithmetic. */
812+
813+#ifdef __INT_LEAST8_MAX__
814+typedef __INT_LEAST8_TYPE__ yytype_int8;
815+#elif defined YY_STDINT_H
816+typedef int_least8_t yytype_int8;
817 #else
818 typedef signed char yytype_int8;
819 #endif
820
821-#ifdef YYTYPE_UINT16
822-typedef YYTYPE_UINT16 yytype_uint16;
823+#ifdef __INT_LEAST16_MAX__
824+typedef __INT_LEAST16_TYPE__ yytype_int16;
825+#elif defined YY_STDINT_H
826+typedef int_least16_t yytype_int16;
827 #else
828-typedef unsigned short yytype_uint16;
829+typedef short yytype_int16;
830 #endif
831
832-#ifdef YYTYPE_INT16
833-typedef YYTYPE_INT16 yytype_int16;
834+/* Work around bug in HP-UX 11.23, which defines these macros
835+ incorrectly for preprocessor constants. This workaround can likely
836+ be removed in 2023, as HPE has promised support for HP-UX 11.23
837+ (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
838+ <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
839+#ifdef __hpux
840+# undef UINT_LEAST8_MAX
841+# undef UINT_LEAST16_MAX
842+# define UINT_LEAST8_MAX 255
843+# define UINT_LEAST16_MAX 65535
844+#endif
845+
846+#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
847+typedef __UINT_LEAST8_TYPE__ yytype_uint8;
848+#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
849+ && UINT_LEAST8_MAX <= INT_MAX)
850+typedef uint_least8_t yytype_uint8;
851+#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
852+typedef unsigned char yytype_uint8;
853 #else
854-typedef short yytype_int16;
855+typedef short yytype_uint8;
856+#endif
857+
858+#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
859+typedef __UINT_LEAST16_TYPE__ yytype_uint16;
860+#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
861+ && UINT_LEAST16_MAX <= INT_MAX)
862+typedef uint_least16_t yytype_uint16;
863+#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
864+typedef unsigned short yytype_uint16;
865+#else
866+typedef int yytype_uint16;
867+#endif
868+
869+#ifndef YYPTRDIFF_T
870+# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
871+# define YYPTRDIFF_T __PTRDIFF_TYPE__
872+# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
873+# elif defined PTRDIFF_MAX
874+# ifndef ptrdiff_t
875+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
876+# endif
877+# define YYPTRDIFF_T ptrdiff_t
878+# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
879+# else
880+# define YYPTRDIFF_T long
881+# define YYPTRDIFF_MAXIMUM LONG_MAX
882+# endif
883 #endif
884
885 #ifndef YYSIZE_T
886@@ -201,7 +287,7 @@ typedef short yytype_int16;
887 # define YYSIZE_T __SIZE_TYPE__
888 # elif defined size_t
889 # define YYSIZE_T size_t
890-# elif ! defined YYSIZE_T
891+# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
892 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
893 # define YYSIZE_T size_t
894 # else
895@@ -209,7 +295,20 @@ typedef short yytype_int16;
896 # endif
897 #endif
898
899-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
900+#define YYSIZE_MAXIMUM \
901+ YY_CAST (YYPTRDIFF_T, \
902+ (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
903+ ? YYPTRDIFF_MAXIMUM \
904+ : YY_CAST (YYSIZE_T, -1)))
905+
906+#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
907+
908+
909+/* Stored state numbers (used for stacks). */
910+typedef yytype_int8 yy_state_t;
911+
912+/* State numbers in computations. */
913+typedef int yy_state_fast_t;
914
915 #ifndef YY_
916 # if defined YYENABLE_NLS && YYENABLE_NLS
917@@ -223,38 +322,37 @@ typedef short yytype_int16;
918 # endif
919 #endif
920
921-#ifndef YY_ATTRIBUTE
922-# if (defined __GNUC__ \
923- && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
924- || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
925-# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
926-# else
927-# define YY_ATTRIBUTE(Spec) /* empty */
928-# endif
929-#endif
930
931 #ifndef YY_ATTRIBUTE_PURE
932-# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
933+# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
934+# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
935+# else
936+# define YY_ATTRIBUTE_PURE
937+# endif
938 #endif
939
940 #ifndef YY_ATTRIBUTE_UNUSED
941-# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
942+# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
943+# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
944+# else
945+# define YY_ATTRIBUTE_UNUSED
946+# endif
947 #endif
948
949 /* Suppress unused-variable warnings by "using" E. */
950 #if ! defined lint || defined __GNUC__
951-# define YYUSE(E) ((void) (E))
952+# define YY_USE(E) ((void) (E))
953 #else
954-# define YYUSE(E) /* empty */
955+# define YY_USE(E) /* empty */
956 #endif
957
958 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
959 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
960-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
961- _Pragma ("GCC diagnostic push") \
962- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
963+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
964+ _Pragma ("GCC diagnostic push") \
965+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
966 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
967-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
968+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
969 _Pragma ("GCC diagnostic pop")
970 #else
971 # define YY_INITIAL_VALUE(Value) Value
972@@ -267,8 +365,22 @@ typedef short yytype_int16;
973 # define YY_INITIAL_VALUE(Value) /* Nothing. */
974 #endif
975
976+#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
977+# define YY_IGNORE_USELESS_CAST_BEGIN \
978+ _Pragma ("GCC diagnostic push") \
979+ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
980+# define YY_IGNORE_USELESS_CAST_END \
981+ _Pragma ("GCC diagnostic pop")
982+#endif
983+#ifndef YY_IGNORE_USELESS_CAST_BEGIN
984+# define YY_IGNORE_USELESS_CAST_BEGIN
985+# define YY_IGNORE_USELESS_CAST_END
986+#endif
987
988-#if ! defined yyoverflow || YYERROR_VERBOSE
989+
990+#define YY_ASSERT(E) ((void) (0 && (E)))
991+
992+#if !defined yyoverflow
993
994 /* The parser invokes alloca or malloc; define the necessary symbols. */
995
996@@ -333,8 +445,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
997 # endif
998 # endif
999 # endif
1000-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1001-
1002+#endif /* !defined yyoverflow */
1003
1004 #if (! defined yyoverflow \
1005 && (! defined __cplusplus \
1006@@ -343,17 +454,17 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
1007 /* A type that is properly aligned for any stack member. */
1008 union yyalloc
1009 {
1010- yytype_int16 yyss_alloc;
1011+ yy_state_t yyss_alloc;
1012 YYSTYPE yyvs_alloc;
1013 };
1014
1015 /* The size of the maximum gap between one aligned stack and the next. */
1016-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1017+# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
1018
1019 /* The size of an array large to enough to hold all stacks, each with
1020 N elements. */
1021 # define YYSTACK_BYTES(N) \
1022- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1023+ ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
1024 + YYSTACK_GAP_MAXIMUM)
1025
1026 # define YYCOPY_NEEDED 1
1027@@ -366,11 +477,11 @@ union yyalloc
1028 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1029 do \
1030 { \
1031- YYSIZE_T yynewbytes; \
1032+ YYPTRDIFF_T yynewbytes; \
1033 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1034 Stack = &yyptr->Stack_alloc; \
1035- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1036- yyptr += yynewbytes / sizeof (*yyptr); \
1037+ yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
1038+ yyptr += yynewbytes / YYSIZEOF (*yyptr); \
1039 } \
1040 while (0)
1041
1042@@ -382,12 +493,12 @@ union yyalloc
1043 # ifndef YYCOPY
1044 # if defined __GNUC__ && 1 < __GNUC__
1045 # define YYCOPY(Dst, Src, Count) \
1046- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
1047+ __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
1048 # else
1049 # define YYCOPY(Dst, Src, Count) \
1050 do \
1051 { \
1052- YYSIZE_T yyi; \
1053+ YYPTRDIFF_T yyi; \
1054 for (yyi = 0; yyi < (Count); yyi++) \
1055 (Dst)[yyi] = (Src)[yyi]; \
1056 } \
1057@@ -410,17 +521,20 @@ union yyalloc
1058 /* YYNSTATES -- Number of states. */
1059 #define YYNSTATES 19
1060
1061-#define YYUNDEFTOK 2
1062+/* YYMAXUTOK -- Last valid token kind. */
1063 #define YYMAXUTOK 263
1064
1065+
1066 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
1067 as returned by yylex, with out-of-bounds checking. */
1068-#define YYTRANSLATE(YYX) \
1069- ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1070+#define YYTRANSLATE(YYX) \
1071+ (0 <= (YYX) && (YYX) <= YYMAXUTOK \
1072+ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
1073+ : YYSYMBOL_YYUNDEF)
1074
1075 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1076 as returned by yylex. */
1077-static const yytype_uint8 yytranslate[] =
1078+static const yytype_int8 yytranslate[] =
1079 {
1080 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1081 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1082@@ -459,34 +573,47 @@ static const yytype_uint8 yyrline[] =
1083 };
1084 #endif
1085
1086-#if YYDEBUG || YYERROR_VERBOSE || 0
1087+/** Accessing symbol of state STATE. */
1088+#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
1089+
1090+#if YYDEBUG || 0
1091+/* The user-facing name of the symbol whose (internal) number is
1092+ YYSYMBOL. No bounds checking. */
1093+static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
1094+
1095 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1096 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1097 static const char *const yytname[] =
1098 {
1099- "$end", "error", "$undefined", "CUBEFLOAT", "O_PAREN", "C_PAREN",
1100- "O_BRACKET", "C_BRACKET", "COMMA", "$accept", "box", "paren_list",
1101- "list", YY_NULLPTR
1102+ "\"end of file\"", "error", "\"invalid token\"", "CUBEFLOAT", "O_PAREN",
1103+ "C_PAREN", "O_BRACKET", "C_BRACKET", "COMMA", "$accept", "box",
1104+ "paren_list", "list", YY_NULLPTR
1105 };
1106+
1107+static const char *
1108+yysymbol_name (yysymbol_kind_t yysymbol)
1109+{
1110+ return yytname[yysymbol];
1111+}
1112 #endif
1113
1114-# ifdef YYPRINT
1115+#ifdef YYPRINT
1116 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1117 (internal) symbol number NUM (which must be that of a token). */
1118-static const yytype_uint16 yytoknum[] =
1119+static const yytype_int16 yytoknum[] =
1120 {
1121 0, 256, 257, 258, 259, 260, 261, 262, 263
1122 };
1123-# endif
1124+#endif
1125
1126-#define YYPACT_NINF -4
1127+#define YYPACT_NINF (-4)
1128
1129-#define yypact_value_is_default(Yystate) \
1130- (!!((Yystate) == (-4)))
1131+#define yypact_value_is_default(Yyn) \
1132+ ((Yyn) == YYPACT_NINF)
1133
1134-#define YYTABLE_NINF -1
1135+#define YYTABLE_NINF (-1)
1136
1137-#define yytable_value_is_error(Yytable_value) \
1138+#define yytable_value_is_error(Yyn) \
1139 0
1140
1141 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1142@@ -500,7 +627,7 @@ static const yytype_int8 yypact[] =
1143 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1144 Performed when YYTABLE does not specify something else to do. Zero
1145 means the default is an error. */
1146-static const yytype_uint8 yydefact[] =
1147+static const yytype_int8 yydefact[] =
1148 {
1149 0, 8, 0, 0, 0, 4, 5, 7, 0, 0,
1150 1, 0, 0, 6, 0, 3, 9, 0, 2
1151@@ -515,19 +642,19 @@ static const yytype_int8 yypgoto[] =
1152 /* YYDEFGOTO[NTERM-NUM]. */
1153 static const yytype_int8 yydefgoto[] =
1154 {
1155- -1, 4, 5, 6
1156+ 0, 4, 5, 6
1157 };
1158
1159 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1160 positive, shift that token. If negative, reduce the rule whose
1161 number is the opposite. If YYTABLE_NINF, syntax error. */
1162-static const yytype_uint8 yytable[] =
1163+static const yytype_int8 yytable[] =
1164 {
1165 9, 1, 2, 1, 3, 7, 13, 2, 15, 12,
1166 10, 17, 11, 12, 14, 16, 18, 8
1167 };
1168
1169-static const yytype_uint8 yycheck[] =
1170+static const yytype_int8 yycheck[] =
1171 {
1172 3, 3, 4, 3, 6, 5, 5, 4, 11, 8,
1173 0, 14, 8, 8, 8, 3, 7, 2
1174@@ -535,29 +662,29 @@ static const yytype_uint8 yycheck[] =
1175
1176 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1177 symbol of state STATE-NUM. */
1178-static const yytype_uint8 yystos[] =
1179+static const yytype_int8 yystos[] =
1180 {
1181 0, 3, 4, 6, 10, 11, 12, 5, 12, 11,
1182 0, 8, 8, 5, 8, 11, 3, 11, 7
1183 };
1184
1185 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1186-static const yytype_uint8 yyr1[] =
1187+static const yytype_int8 yyr1[] =
1188 {
1189 0, 9, 10, 10, 10, 10, 11, 11, 12, 12
1190 };
1191
1192 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1193-static const yytype_uint8 yyr2[] =
1194+static const yytype_int8 yyr2[] =
1195 {
1196 0, 2, 5, 3, 1, 1, 3, 2, 1, 3
1197 };
1198
1199
1200+enum { YYENOMEM = -2 };
1201+
1202 #define yyerrok (yyerrstatus = 0)
1203 #define yyclearin (yychar = YYEMPTY)
1204-#define YYEMPTY (-2)
1205-#define YYEOF 0
1206
1207 #define YYACCEPT goto yyacceptlab
1208 #define YYABORT goto yyabortlab
1209@@ -583,10 +710,9 @@ static const yytype_uint8 yyr2[] =
1210 } \
1211 while (0)
1212
1213-/* Error token number */
1214-#define YYTERROR 1
1215-#define YYERRCODE 256
1216-
1217+/* Backward compatibility with an undocumented macro.
1218+ Use YYerror or YYUNDEF. */
1219+#define YYERRCODE YYUNDEF
1220
1221
1222 /* Enable debugging if requested. */
1223@@ -604,18 +730,18 @@ do { \
1224 } while (0)
1225
1226 /* This macro is provided for backward compatibility. */
1227-#ifndef YY_LOCATION_PRINT
1228-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1229-#endif
1230+# ifndef YY_LOCATION_PRINT
1231+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1232+# endif
1233
1234
1235-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1236+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
1237 do { \
1238 if (yydebug) \
1239 { \
1240 YYFPRINTF (stderr, "%s ", Title); \
1241 yy_symbol_print (stderr, \
1242- Type, Value, result); \
1243+ Kind, Value, result); \
1244 YYFPRINTF (stderr, "\n"); \
1245 } \
1246 } while (0)
1247@@ -626,18 +752,21 @@ do { \
1248 `-----------------------------------*/
1249
1250 static void
1251-yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, NDBOX **result)
1252+yy_symbol_value_print (FILE *yyo,
1253+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, NDBOX **result)
1254 {
1255 FILE *yyoutput = yyo;
1256- YYUSE (yyoutput);
1257- YYUSE (result);
1258+ YY_USE (yyoutput);
1259+ YY_USE (result);
1260 if (!yyvaluep)
1261 return;
1262 # ifdef YYPRINT
1263- if (yytype < YYNTOKENS)
1264- YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
1265+ if (yykind < YYNTOKENS)
1266+ YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
1267 # endif
1268- YYUSE (yytype);
1269+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1270+ YY_USE (yykind);
1271+ YY_IGNORE_MAYBE_UNINITIALIZED_END
1272 }
1273
1274
1275@@ -646,12 +775,13 @@ yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, ND
1276 `---------------------------*/
1277
1278 static void
1279-yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, NDBOX **result)
1280+yy_symbol_print (FILE *yyo,
1281+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, NDBOX **result)
1282 {
1283 YYFPRINTF (yyo, "%s %s (",
1284- yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1285+ yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
1286
1287- yy_symbol_value_print (yyo, yytype, yyvaluep, result);
1288+ yy_symbol_value_print (yyo, yykind, yyvaluep, result);
1289 YYFPRINTF (yyo, ")");
1290 }
1291
1292@@ -661,7 +791,7 @@ yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, NDBOX **
1293 `------------------------------------------------------------------*/
1294
1295 static void
1296-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1297+yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
1298 {
1299 YYFPRINTF (stderr, "Stack now");
1300 for (; yybottom <= yytop; yybottom++)
1301@@ -684,21 +814,21 @@ do { \
1302 `------------------------------------------------*/
1303
1304 static void
1305-yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, NDBOX **result)
1306+yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
1307+ int yyrule, NDBOX **result)
1308 {
1309- unsigned long yylno = yyrline[yyrule];
1310+ int yylno = yyrline[yyrule];
1311 int yynrhs = yyr2[yyrule];
1312 int yyi;
1313- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1314+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
1315 yyrule - 1, yylno);
1316 /* The symbols being reduced. */
1317 for (yyi = 0; yyi < yynrhs; yyi++)
1318 {
1319 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1320 yy_symbol_print (stderr,
1321- yystos[yyssp[yyi + 1 - yynrhs]],
1322- &yyvsp[(yyi + 1) - (yynrhs)]
1323- , result);
1324+ YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
1325+ &yyvsp[(yyi + 1) - (yynrhs)], result);
1326 YYFPRINTF (stderr, "\n");
1327 }
1328 }
1329@@ -713,8 +843,8 @@ do { \
1330 multiple parsers can coexist. */
1331 int yydebug;
1332 #else /* !YYDEBUG */
1333-# define YYDPRINTF(Args)
1334-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1335+# define YYDPRINTF(Args) ((void) 0)
1336+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1337 # define YY_STACK_PRINT(Bottom, Top)
1338 # define YY_REDUCE_PRINT(Rule)
1339 #endif /* !YYDEBUG */
1340@@ -737,255 +867,31 @@ int yydebug;
1341 #endif
1342
1343
1344-#if YYERROR_VERBOSE
1345-
1346-# ifndef yystrlen
1347-# if defined __GLIBC__ && defined _STRING_H
1348-# define yystrlen strlen
1349-# else
1350-/* Return the length of YYSTR. */
1351-static YYSIZE_T
1352-yystrlen (const char *yystr)
1353-{
1354- YYSIZE_T yylen;
1355- for (yylen = 0; yystr[yylen]; yylen++)
1356- continue;
1357- return yylen;
1358-}
1359-# endif
1360-# endif
1361-
1362-# ifndef yystpcpy
1363-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1364-# define yystpcpy stpcpy
1365-# else
1366-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1367- YYDEST. */
1368-static char *
1369-yystpcpy (char *yydest, const char *yysrc)
1370-{
1371- char *yyd = yydest;
1372- const char *yys = yysrc;
1373-
1374- while ((*yyd++ = *yys++) != '\0')
1375- continue;
1376
1377- return yyd - 1;
1378-}
1379-# endif
1380-# endif
1381
1382-# ifndef yytnamerr
1383-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1384- quotes and backslashes, so that it's suitable for yyerror. The
1385- heuristic is that double-quoting is unnecessary unless the string
1386- contains an apostrophe, a comma, or backslash (other than
1387- backslash-backslash). YYSTR is taken from yytname. If YYRES is
1388- null, do not copy; instead, return the length of what the result
1389- would have been. */
1390-static YYSIZE_T
1391-yytnamerr (char *yyres, const char *yystr)
1392-{
1393- if (*yystr == '"')
1394- {
1395- YYSIZE_T yyn = 0;
1396- char const *yyp = yystr;
1397-
1398- for (;;)
1399- switch (*++yyp)
1400- {
1401- case '\'':
1402- case ',':
1403- goto do_not_strip_quotes;
1404-
1405- case '\\':
1406- if (*++yyp != '\\')
1407- goto do_not_strip_quotes;
1408- else
1409- goto append;
1410-
1411- append:
1412- default:
1413- if (yyres)
1414- yyres[yyn] = *yyp;
1415- yyn++;
1416- break;
1417-
1418- case '"':
1419- if (yyres)
1420- yyres[yyn] = '\0';
1421- return yyn;
1422- }
1423- do_not_strip_quotes: ;
1424- }
1425
1426- if (! yyres)
1427- return yystrlen (yystr);
1428-
1429- return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
1430-}
1431-# endif
1432-
1433-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1434- about the unexpected token YYTOKEN for the state stack whose top is
1435- YYSSP.
1436-
1437- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1438- not large enough to hold the message. In that case, also set
1439- *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1440- required number of bytes is too large to store. */
1441-static int
1442-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1443- yytype_int16 *yyssp, int yytoken)
1444-{
1445- YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1446- YYSIZE_T yysize = yysize0;
1447- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1448- /* Internationalized format string. */
1449- const char *yyformat = YY_NULLPTR;
1450- /* Arguments of yyformat. */
1451- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1452- /* Number of reported tokens (one for the "unexpected", one per
1453- "expected"). */
1454- int yycount = 0;
1455-
1456- /* There are many possibilities here to consider:
1457- - If this state is a consistent state with a default action, then
1458- the only way this function was invoked is if the default action
1459- is an error action. In that case, don't check for expected
1460- tokens because there are none.
1461- - The only way there can be no lookahead present (in yychar) is if
1462- this state is a consistent state with a default action. Thus,
1463- detecting the absence of a lookahead is sufficient to determine
1464- that there is no unexpected or expected token to report. In that
1465- case, just report a simple "syntax error".
1466- - Don't assume there isn't a lookahead just because this state is a
1467- consistent state with a default action. There might have been a
1468- previous inconsistent state, consistent state with a non-default
1469- action, or user semantic action that manipulated yychar.
1470- - Of course, the expected token list depends on states to have
1471- correct lookahead information, and it depends on the parser not
1472- to perform extra reductions after fetching a lookahead from the
1473- scanner and before detecting a syntax error. Thus, state merging
1474- (from LALR or IELR) and default reductions corrupt the expected
1475- token list. However, the list is correct for canonical LR with
1476- one exception: it will still contain any token that will not be
1477- accepted due to an error action in a later state.
1478- */
1479- if (yytoken != YYEMPTY)
1480- {
1481- int yyn = yypact[*yyssp];
1482- yyarg[yycount++] = yytname[yytoken];
1483- if (!yypact_value_is_default (yyn))
1484- {
1485- /* Start YYX at -YYN if negative to avoid negative indexes in
1486- YYCHECK. In other words, skip the first -YYN actions for
1487- this state because they are default actions. */
1488- int yyxbegin = yyn < 0 ? -yyn : 0;
1489- /* Stay within bounds of both yycheck and yytname. */
1490- int yychecklim = YYLAST - yyn + 1;
1491- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1492- int yyx;
1493-
1494- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1495- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1496- && !yytable_value_is_error (yytable[yyx + yyn]))
1497- {
1498- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1499- {
1500- yycount = 1;
1501- yysize = yysize0;
1502- break;
1503- }
1504- yyarg[yycount++] = yytname[yyx];
1505- {
1506- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1507- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1508- yysize = yysize1;
1509- else
1510- return 2;
1511- }
1512- }
1513- }
1514- }
1515-
1516- switch (yycount)
1517- {
1518-# define YYCASE_(N, S) \
1519- case N: \
1520- yyformat = S; \
1521- break
1522- default: /* Avoid compiler warnings. */
1523- YYCASE_(0, YY_("syntax error"));
1524- YYCASE_(1, YY_("syntax error, unexpected %s"));
1525- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1526- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1527- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1528- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1529-# undef YYCASE_
1530- }
1531-
1532- {
1533- YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1534- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1535- yysize = yysize1;
1536- else
1537- return 2;
1538- }
1539-
1540- if (*yymsg_alloc < yysize)
1541- {
1542- *yymsg_alloc = 2 * yysize;
1543- if (! (yysize <= *yymsg_alloc
1544- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1545- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1546- return 1;
1547- }
1548-
1549- /* Avoid sprintf, as that infringes on the user's name space.
1550- Don't have undefined behavior even if the translation
1551- produced a string with the wrong number of "%s"s. */
1552- {
1553- char *yyp = *yymsg;
1554- int yyi = 0;
1555- while ((*yyp = *yyformat) != '\0')
1556- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1557- {
1558- yyp += yytnamerr (yyp, yyarg[yyi++]);
1559- yyformat += 2;
1560- }
1561- else
1562- {
1563- yyp++;
1564- yyformat++;
1565- }
1566- }
1567- return 0;
1568-}
1569-#endif /* YYERROR_VERBOSE */
1570
1571 /*-----------------------------------------------.
1572 | Release the memory associated to this symbol. |
1573 `-----------------------------------------------*/
1574
1575 static void
1576-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, NDBOX **result)
1577+yydestruct (const char *yymsg,
1578+ yysymbol_kind_t yykind, YYSTYPE *yyvaluep, NDBOX **result)
1579 {
1580- YYUSE (yyvaluep);
1581- YYUSE (result);
1582+ YY_USE (yyvaluep);
1583+ YY_USE (result);
1584 if (!yymsg)
1585 yymsg = "Deleting";
1586- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1587+ YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
1588
1589 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1590- YYUSE (yytype);
1591+ YY_USE (yykind);
1592 YY_IGNORE_MAYBE_UNINITIALIZED_END
1593 }
1594
1595
1596-
1597-
1598-/* The lookahead symbol. */
1599+/* Lookahead token kind. */
1600 int yychar;
1601
1602 /* The semantic value of the lookahead symbol. */
1603@@ -994,6 +900,8 @@ YYSTYPE yylval;
1604 int yynerrs;
1605
1606
1607+
1608+
1609 /*----------.
1610 | yyparse. |
1611 `----------*/
1612@@ -1001,43 +909,36 @@ int yynerrs;
1613 int
1614 yyparse (NDBOX **result)
1615 {
1616- int yystate;
1617+ yy_state_fast_t yystate = 0;
1618 /* Number of tokens to shift before error messages enabled. */
1619- int yyerrstatus;
1620-
1621- /* The stacks and their tools:
1622- 'yyss': related to states.
1623- 'yyvs': related to semantic values.
1624+ int yyerrstatus = 0;
1625
1626- Refer to the stacks through separate pointers, to allow yyoverflow
1627+ /* Refer to the stacks through separate pointers, to allow yyoverflow
1628 to reallocate them elsewhere. */
1629
1630- /* The state stack. */
1631- yytype_int16 yyssa[YYINITDEPTH];
1632- yytype_int16 *yyss;
1633- yytype_int16 *yyssp;
1634+ /* Their size. */
1635+ YYPTRDIFF_T yystacksize = YYINITDEPTH;
1636
1637- /* The semantic value stack. */
1638- YYSTYPE yyvsa[YYINITDEPTH];
1639- YYSTYPE *yyvs;
1640- YYSTYPE *yyvsp;
1641+ /* The state stack: array, bottom, top. */
1642+ yy_state_t yyssa[YYINITDEPTH];
1643+ yy_state_t *yyss = yyssa;
1644+ yy_state_t *yyssp = yyss;
1645
1646- YYSIZE_T yystacksize;
1647+ /* The semantic value stack: array, bottom, top. */
1648+ YYSTYPE yyvsa[YYINITDEPTH];
1649+ YYSTYPE *yyvs = yyvsa;
1650+ YYSTYPE *yyvsp = yyvs;
1651
1652 int yyn;
1653+ /* The return value of yyparse. */
1654 int yyresult;
1655- /* Lookahead token as an internal (translated) token number. */
1656- int yytoken = 0;
1657+ /* Lookahead symbol kind. */
1658+ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
1659 /* The variables used to return semantic value and location from the
1660 action routines. */
1661 YYSTYPE yyval;
1662
1663-#if YYERROR_VERBOSE
1664- /* Buffer for error messages, and its allocated size. */
1665- char yymsgbuf[128];
1666- char *yymsg = yymsgbuf;
1667- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1668-#endif
1669+
1670
1671 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1672
1673@@ -1045,15 +946,8 @@ yyparse (NDBOX **result)
1674 Keep to zero when no symbol should be popped. */
1675 int yylen = 0;
1676
1677- yyssp = yyss = yyssa;
1678- yyvsp = yyvs = yyvsa;
1679- yystacksize = YYINITDEPTH;
1680-
1681 YYDPRINTF ((stderr, "Starting parse\n"));
1682
1683- yystate = 0;
1684- yyerrstatus = 0;
1685- yynerrs = 0;
1686 yychar = YYEMPTY; /* Cause a token to be read. */
1687 goto yysetstate;
1688
1689@@ -1068,10 +962,15 @@ yynewstate:
1690
1691
1692 /*--------------------------------------------------------------------.
1693-| yynewstate -- set current state (the top of the stack) to yystate. |
1694+| yysetstate -- set current state (the top of the stack) to yystate. |
1695 `--------------------------------------------------------------------*/
1696 yysetstate:
1697- *yyssp = (yytype_int16) yystate;
1698+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1699+ YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1700+ YY_IGNORE_USELESS_CAST_BEGIN
1701+ *yyssp = YY_CAST (yy_state_t, yystate);
1702+ YY_IGNORE_USELESS_CAST_END
1703+ YY_STACK_PRINT (yyss, yyssp);
1704
1705 if (yyss + yystacksize - 1 <= yyssp)
1706 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1707@@ -1079,23 +978,23 @@ yysetstate:
1708 #else
1709 {
1710 /* Get the current used size of the three stacks, in elements. */
1711- YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
1712+ YYPTRDIFF_T yysize = yyssp - yyss + 1;
1713
1714 # if defined yyoverflow
1715 {
1716 /* Give user a chance to reallocate the stack. Use copies of
1717 these so that the &'s don't force the real ones into
1718 memory. */
1719+ yy_state_t *yyss1 = yyss;
1720 YYSTYPE *yyvs1 = yyvs;
1721- yytype_int16 *yyss1 = yyss;
1722
1723 /* Each stack pointer address is followed by the size of the
1724 data in use in that stack, in bytes. This used to be a
1725 conditional around just the two extra args, but that might
1726 be undefined if yyoverflow is a macro. */
1727 yyoverflow (YY_("memory exhausted"),
1728- &yyss1, yysize * sizeof (*yyssp),
1729- &yyvs1, yysize * sizeof (*yyvsp),
1730+ &yyss1, yysize * YYSIZEOF (*yyssp),
1731+ &yyvs1, yysize * YYSIZEOF (*yyvsp),
1732 &yystacksize);
1733 yyss = yyss1;
1734 yyvs = yyvs1;
1735@@ -1109,14 +1008,15 @@ yysetstate:
1736 yystacksize = YYMAXDEPTH;
1737
1738 {
1739- yytype_int16 *yyss1 = yyss;
1740+ yy_state_t *yyss1 = yyss;
1741 union yyalloc *yyptr =
1742- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1743+ YY_CAST (union yyalloc *,
1744+ YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1745 if (! yyptr)
1746 goto yyexhaustedlab;
1747 YYSTACK_RELOCATE (yyss_alloc, yyss);
1748 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1749-# undef YYSTACK_RELOCATE
1750+# undef YYSTACK_RELOCATE
1751 if (yyss1 != yyssa)
1752 YYSTACK_FREE (yyss1);
1753 }
1754@@ -1125,16 +1025,16 @@ yysetstate:
1755 yyssp = yyss + yysize - 1;
1756 yyvsp = yyvs + yysize - 1;
1757
1758- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1759- (unsigned long) yystacksize));
1760+ YY_IGNORE_USELESS_CAST_BEGIN
1761+ YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1762+ YY_CAST (long, yystacksize)));
1763+ YY_IGNORE_USELESS_CAST_END
1764
1765 if (yyss + yystacksize - 1 <= yyssp)
1766 YYABORT;
1767 }
1768 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1769
1770- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1771-
1772 if (yystate == YYFINAL)
1773 YYACCEPT;
1774
1775@@ -1155,18 +1055,29 @@ yybackup:
1776
1777 /* Not known => get a lookahead token if don't already have one. */
1778
1779- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1780+ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
1781 if (yychar == YYEMPTY)
1782 {
1783- YYDPRINTF ((stderr, "Reading a token: "));
1784+ YYDPRINTF ((stderr, "Reading a token\n"));
1785 yychar = yylex ();
1786 }
1787
1788 if (yychar <= YYEOF)
1789 {
1790- yychar = yytoken = YYEOF;
1791+ yychar = YYEOF;
1792+ yytoken = YYSYMBOL_YYEOF;
1793 YYDPRINTF ((stderr, "Now at end of input.\n"));
1794 }
1795+ else if (yychar == YYerror)
1796+ {
1797+ /* The scanner already issued an error message, process directly
1798+ to error recovery. But do not keep the error token as
1799+ lookahead, it is too special and may lead us to an endless
1800+ loop in error recovery. */
1801+ yychar = YYUNDEF;
1802+ yytoken = YYSYMBOL_YYerror;
1803+ goto yyerrlab1;
1804+ }
1805 else
1806 {
1807 yytoken = YYTRANSLATE (yychar);
1808@@ -1194,15 +1105,13 @@ yybackup:
1809
1810 /* Shift the lookahead token. */
1811 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1812-
1813- /* Discard the shifted token. */
1814- yychar = YYEMPTY;
1815-
1816 yystate = yyn;
1817 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1818 *++yyvsp = yylval;
1819 YY_IGNORE_MAYBE_UNINITIALIZED_END
1820
1821+ /* Discard the shifted token. */
1822+ yychar = YYEMPTY;
1823 goto yynewstate;
1824
1825
1826@@ -1237,9 +1146,9 @@ yyreduce:
1827 YY_REDUCE_PRINT (yyn);
1828 switch (yyn)
1829 {
1830- case 2:
1831-#line 47 "cubeparse.y" /* yacc.c:1652 */
1832- {
1833+ case 2: /* box: O_BRACKET paren_list COMMA paren_list C_BRACKET */
1834+#line 47 "cubeparse.y"
1835+ {
1836 int dim;
1837
1838 dim = item_count(yyvsp[-3], ',');
1839@@ -1264,12 +1173,12 @@ yyreduce:
1840
1841 *result = write_box( dim, yyvsp[-3], yyvsp[-1] );
1842 }
1843-#line 1268 "cubeparse.c" /* yacc.c:1652 */
1844+#line 1177 "cubeparse.c"
1845 break;
1846
1847- case 3:
1848-#line 74 "cubeparse.y" /* yacc.c:1652 */
1849- {
1850+ case 3: /* box: paren_list COMMA paren_list */
1851+#line 74 "cubeparse.y"
1852+ {
1853 int dim;
1854
1855 dim = item_count(yyvsp[-2], ',');
1856@@ -1294,12 +1203,12 @@ yyreduce:
1857
1858 *result = write_box( dim, yyvsp[-2], yyvsp[0] );
1859 }
1860-#line 1298 "cubeparse.c" /* yacc.c:1652 */
1861+#line 1207 "cubeparse.c"
1862 break;
1863
1864- case 4:
1865-#line 101 "cubeparse.y" /* yacc.c:1652 */
1866- {
1867+ case 4: /* box: paren_list */
1868+#line 101 "cubeparse.y"
1869+ {
1870 int dim;
1871
1872 dim = item_count(yyvsp[0], ',');
1873@@ -1315,12 +1224,12 @@ yyreduce:
1874
1875 *result = write_point_as_box(dim, yyvsp[0]);
1876 }
1877-#line 1319 "cubeparse.c" /* yacc.c:1652 */
1878+#line 1228 "cubeparse.c"
1879 break;
1880
1881- case 5:
1882-#line 119 "cubeparse.y" /* yacc.c:1652 */
1883- {
1884+ case 5: /* box: list */
1885+#line 119 "cubeparse.y"
1886+ {
1887 int dim;
1888
1889 dim = item_count(yyvsp[0], ',');
1890@@ -1336,47 +1245,48 @@ yyreduce:
1891
1892 *result = write_point_as_box(dim, yyvsp[0]);
1893 }
1894-#line 1340 "cubeparse.c" /* yacc.c:1652 */
1895+#line 1249 "cubeparse.c"
1896 break;
1897
1898- case 6:
1899-#line 138 "cubeparse.y" /* yacc.c:1652 */
1900- {
1901+ case 6: /* paren_list: O_PAREN list C_PAREN */
1902+#line 138 "cubeparse.y"
1903+ {
1904 yyval = yyvsp[-1];
1905 }
1906-#line 1348 "cubeparse.c" /* yacc.c:1652 */
1907+#line 1257 "cubeparse.c"
1908 break;
1909
1910- case 7:
1911-#line 142 "cubeparse.y" /* yacc.c:1652 */
1912- {
1913+ case 7: /* paren_list: O_PAREN C_PAREN */
1914+#line 142 "cubeparse.y"
1915+ {
1916 yyval = pstrdup("");
1917 }
1918-#line 1356 "cubeparse.c" /* yacc.c:1652 */
1919+#line 1265 "cubeparse.c"
1920 break;
1921
1922- case 8:
1923-#line 148 "cubeparse.y" /* yacc.c:1652 */
1924- {
1925+ case 8: /* list: CUBEFLOAT */
1926+#line 148 "cubeparse.y"
1927+ {
1928 /* alloc enough space to be sure whole list will fit */
1929 yyval = palloc(scanbuflen + 1);
1930 strcpy(yyval, yyvsp[0]);
1931 }
1932-#line 1366 "cubeparse.c" /* yacc.c:1652 */
1933+#line 1275 "cubeparse.c"
1934 break;
1935
1936- case 9:
1937-#line 154 "cubeparse.y" /* yacc.c:1652 */
1938- {
1939+ case 9: /* list: list COMMA CUBEFLOAT */
1940+#line 154 "cubeparse.y"
1941+ {
1942 yyval = yyvsp[-2];
1943 strcat(yyval, ",");
1944 strcat(yyval, yyvsp[0]);
1945 }
1946-#line 1376 "cubeparse.c" /* yacc.c:1652 */
1947+#line 1285 "cubeparse.c"
1948 break;
1949
1950
1951-#line 1380 "cubeparse.c" /* yacc.c:1652 */
1952+#line 1289 "cubeparse.c"
1953+
1954 default: break;
1955 }
1956 /* User semantic actions sometimes alter yychar, and that requires
1957@@ -1390,11 +1300,10 @@ yyreduce:
1958 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1959 to an incorrect destructor call or verbose syntax error message
1960 before the lookahead is translated. */
1961- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1962+ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
1963
1964 YYPOPSTACK (yylen);
1965 yylen = 0;
1966- YY_STACK_PRINT (yyss, yyssp);
1967
1968 *++yyvsp = yyval;
1969
1970@@ -1418,50 +1327,14 @@ yyreduce:
1971 yyerrlab:
1972 /* Make sure we have latest lookahead translation. See comments at
1973 user semantic actions for why this is necessary. */
1974- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1975-
1976+ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
1977 /* If not already recovering from an error, report this error. */
1978 if (!yyerrstatus)
1979 {
1980 ++yynerrs;
1981-#if ! YYERROR_VERBOSE
1982 yyerror (result, YY_("syntax error"));
1983-#else
1984-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1985- yyssp, yytoken)
1986- {
1987- char const *yymsgp = YY_("syntax error");
1988- int yysyntax_error_status;
1989- yysyntax_error_status = YYSYNTAX_ERROR;
1990- if (yysyntax_error_status == 0)
1991- yymsgp = yymsg;
1992- else if (yysyntax_error_status == 1)
1993- {
1994- if (yymsg != yymsgbuf)
1995- YYSTACK_FREE (yymsg);
1996- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1997- if (!yymsg)
1998- {
1999- yymsg = yymsgbuf;
2000- yymsg_alloc = sizeof yymsgbuf;
2001- yysyntax_error_status = 2;
2002- }
2003- else
2004- {
2005- yysyntax_error_status = YYSYNTAX_ERROR;
2006- yymsgp = yymsg;
2007- }
2008- }
2009- yyerror (result, yymsgp);
2010- if (yysyntax_error_status == 2)
2011- goto yyexhaustedlab;
2012- }
2013-# undef YYSYNTAX_ERROR
2014-#endif
2015 }
2016
2017-
2018-
2019 if (yyerrstatus == 3)
2020 {
2021 /* If just tried and failed to reuse lookahead token after an
2022@@ -1510,13 +1383,14 @@ yyerrorlab:
2023 yyerrlab1:
2024 yyerrstatus = 3; /* Each real token shifted decrements this. */
2025
2026+ /* Pop stack until we find a state that shifts the error token. */
2027 for (;;)
2028 {
2029 yyn = yypact[yystate];
2030 if (!yypact_value_is_default (yyn))
2031 {
2032- yyn += YYTERROR;
2033- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2034+ yyn += YYSYMBOL_YYerror;
2035+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
2036 {
2037 yyn = yytable[yyn];
2038 if (0 < yyn)
2039@@ -1530,7 +1404,7 @@ yyerrlab1:
2040
2041
2042 yydestruct ("Error: popping",
2043- yystos[yystate], yyvsp, result);
2044+ YY_ACCESSING_SYMBOL (yystate), yyvsp, result);
2045 YYPOPSTACK (1);
2046 yystate = *yyssp;
2047 YY_STACK_PRINT (yyss, yyssp);
2048@@ -1542,7 +1416,7 @@ yyerrlab1:
2049
2050
2051 /* Shift the error token. */
2052- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2053+ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
2054
2055 yystate = yyn;
2056 goto yynewstate;
2057@@ -1564,20 +1438,20 @@ yyabortlab:
2058 goto yyreturn;
2059
2060
2061-#if !defined yyoverflow || YYERROR_VERBOSE
2062+#if !defined yyoverflow
2063 /*-------------------------------------------------.
2064 | yyexhaustedlab -- memory exhaustion comes here. |
2065 `-------------------------------------------------*/
2066 yyexhaustedlab:
2067 yyerror (result, YY_("memory exhausted"));
2068 yyresult = 2;
2069- /* Fall through. */
2070+ goto yyreturn;
2071 #endif
2072
2073
2074-/*-----------------------------------------------------.
2075-| yyreturn -- parsing is finished, return the result. |
2076-`-----------------------------------------------------*/
2077+/*-------------------------------------------------------.
2078+| yyreturn -- parsing is finished, clean up and return. |
2079+`-------------------------------------------------------*/
2080 yyreturn:
2081 if (yychar != YYEMPTY)
2082 {
2083@@ -1594,20 +1468,18 @@ yyreturn:
2084 while (yyssp != yyss)
2085 {
2086 yydestruct ("Cleanup: popping",
2087- yystos[*yyssp], yyvsp, result);
2088+ YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, result);
2089 YYPOPSTACK (1);
2090 }
2091 #ifndef yyoverflow
2092 if (yyss != yyssa)
2093 YYSTACK_FREE (yyss);
2094 #endif
2095-#if YYERROR_VERBOSE
2096- if (yymsg != yymsgbuf)
2097- YYSTACK_FREE (yymsg);
2098-#endif
2099+
2100 return yyresult;
2101 }
2102-#line 161 "cubeparse.y" /* yacc.c:1918 */
2103+
2104+#line 161 "cubeparse.y"
2105
2106
2107 /* This assumes the string has been normalized by productions above */
2108diff --git a/contrib/ltree/ltree.h b/contrib/ltree/ltree.h
2109index dc68a0c..83fc705 100644
2110--- a/contrib/ltree/ltree.h
2111+++ b/contrib/ltree/ltree.h
2112@@ -216,11 +216,13 @@ int ltree_strncasecmp(const char *a, const char *b, size_t s);
2113
2114 /* GiST support for ltree */
2115
2116-#define SIGLEN_MAX GISTMaxIndexKeySize
2117-#define SIGLEN_DEFAULT (2 * sizeof(int32))
2118 #define BITBYTE 8
2119-#define SIGLEN (sizeof(int32) * SIGLENINT)
2120 #define SIGLENBIT(siglen) ((siglen) * BITBYTE)
2121+#define LTREE_SIGLEN_DEFAULT (2 * sizeof(int32))
2122+#define LTREE_SIGLEN_MAX GISTMaxIndexKeySize
2123+#define LTREE_GET_SIGLEN() (PG_HAS_OPCLASS_OPTIONS() ? \
2124+ ((LtreeGistOptions *) PG_GET_OPCLASS_OPTIONS())->siglen : \
2125+ LTREE_SIGLEN_DEFAULT)
2126
2127 typedef unsigned char *BITVECP;
2128
2129diff --git a/contrib/ltree/ltree_gist.c b/contrib/ltree/ltree_gist.c
2130index 6cf181b..d384e1f 100644
2131--- a/contrib/ltree/ltree_gist.c
2132+++ b/contrib/ltree/ltree_gist.c
2133@@ -130,7 +130,7 @@ ltree_same(PG_FUNCTION_ARGS)
2134 ltree_gist *a = (ltree_gist *) PG_GETARG_POINTER(0);
2135 ltree_gist *b = (ltree_gist *) PG_GETARG_POINTER(1);
2136 bool *result = (bool *) PG_GETARG_POINTER(2);
2137- int siglen = LTREE_GET_ASIGLEN();
2138+ int siglen = LTREE_GET_SIGLEN();
2139
2140 *result = false;
2141 if (LTG_ISONENODE(a) != LTG_ISONENODE(b))
2142@@ -190,7 +190,7 @@ ltree_union(PG_FUNCTION_ARGS)
2143 {
2144 GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0);
2145 int *size = (int *) PG_GETARG_POINTER(1);
2146- int siglen = LTREE_GET_ASIGLEN();
2147+ int siglen = LTREE_GET_SIGLEN();
2148 BITVECP base = palloc0(siglen);
2149 int32 i,
2150 j;
2151@@ -260,7 +260,7 @@ ltree_penalty(PG_FUNCTION_ARGS)
2152 ltree_gist *origval = (ltree_gist *) DatumGetPointer(((GISTENTRY *) PG_GETARG_POINTER(0))->key);
2153 ltree_gist *newval = (ltree_gist *) DatumGetPointer(((GISTENTRY *) PG_GETARG_POINTER(1))->key);
2154 float *penalty = (float *) PG_GETARG_POINTER(2);
2155- int siglen = LTREE_GET_ASIGLEN();
2156+ int siglen = LTREE_GET_SIGLEN();
2157 int32 cmpr,
2158 cmpl;
2159
2160@@ -292,7 +292,7 @@ ltree_picksplit(PG_FUNCTION_ARGS)
2161 {
2162 GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0);
2163 GIST_SPLITVEC *v = (GIST_SPLITVEC *) PG_GETARG_POINTER(1);
2164- int siglen = LTREE_GET_ASIGLEN();
2165+ int siglen = LTREE_GET_SIGLEN();
2166 OffsetNumber j;
2167 int32 i;
2168 RIX *array;
2169@@ -618,7 +618,7 @@ ltree_consistent(PG_FUNCTION_ARGS)
2170
2171 /* Oid subtype = PG_GETARG_OID(3); */
2172 bool *recheck = (bool *) PG_GETARG_POINTER(4);
2173- int siglen = LTREE_GET_ASIGLEN();
2174+ int siglen = LTREE_GET_SIGLEN();
2175 ltree_gist *key = (ltree_gist *) DatumGetPointer(entry->key);
2176 void *query = NULL;
2177 bool res = false;
2178@@ -724,7 +724,7 @@ ltree_gist_options(PG_FUNCTION_ARGS)
2179 init_local_reloptions(relopts, sizeof(LtreeGistOptions));
2180 add_local_int_reloption(relopts, "siglen",
2181 "signature length in bytes",
2182- SIGLEN_DEFAULT, 1, SIGLEN_MAX,
2183+ LTREE_SIGLEN_DEFAULT, 1, LTREE_SIGLEN_MAX,
2184 offsetof(LtreeGistOptions, siglen));
2185
2186 PG_RETURN_VOID();
2187diff --git a/contrib/pageinspect/brinfuncs.c b/contrib/pageinspect/brinfuncs.c
2188index fb32d74..04a90c4 100644
2189--- a/contrib/pageinspect/brinfuncs.c
2190+++ b/contrib/pageinspect/brinfuncs.c
2191@@ -16,6 +16,7 @@
2192 #include "access/brin_tuple.h"
2193 #include "access/htup_details.h"
2194 #include "catalog/index.h"
2195+#include "catalog/pg_am_d.h"
2196 #include "catalog/pg_type.h"
2197 #include "funcapi.h"
2198 #include "lib/stringinfo.h"
2199@@ -31,6 +32,8 @@ PG_FUNCTION_INFO_V1(brin_page_items);
2200 PG_FUNCTION_INFO_V1(brin_metapage_info);
2201 PG_FUNCTION_INFO_V1(brin_revmap_data);
2202
2203+#define IS_BRIN(r) ((r)->rd_rel->relam == BRIN_AM_OID)
2204+
2205 typedef struct brin_column_state
2206 {
2207 int nstored;
2208@@ -45,8 +48,7 @@ Datum
2209 brin_page_type(PG_FUNCTION_ARGS)
2210 {
2211 bytea *raw_page = PG_GETARG_BYTEA_P(0);
2212- Page page = VARDATA(raw_page);
2213- int raw_page_size;
2214+ Page page;
2215 char *type;
2216
2217 if (!superuser())
2218@@ -54,14 +56,19 @@ brin_page_type(PG_FUNCTION_ARGS)
2219 (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
2220 errmsg("must be superuser to use raw page functions")));
2221
2222- raw_page_size = VARSIZE(raw_page) - VARHDRSZ;
2223+ page = get_page_from_raw(raw_page);
2224
2225- if (raw_page_size != BLCKSZ)
2226- ereport(ERROR,
2227- (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2228- errmsg("input page too small"),
2229- errdetail("Expected size %d, got %d",
2230- BLCKSZ, raw_page_size)));
2231+ if (PageIsNew(page))
2232+ PG_RETURN_NULL();
2233+
2234+ /* verify the special space has the expected size */
2235+ if (PageGetSpecialSize(page) != MAXALIGN(sizeof(BrinSpecialSpace)))
2236+ ereport(ERROR,
2237+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2238+ errmsg("input page is not a valid %s page", "BRIN"),
2239+ errdetail("Expected special size %d, got %d.",
2240+ (int) MAXALIGN(sizeof(BrinSpecialSpace)),
2241+ (int) PageGetSpecialSize(page))));
2242
2243 switch (BrinPageType(page))
2244 {
2245@@ -89,19 +96,19 @@ brin_page_type(PG_FUNCTION_ARGS)
2246 static Page
2247 verify_brin_page(bytea *raw_page, uint16 type, const char *strtype)
2248 {
2249- Page page;
2250- int raw_page_size;
2251+ Page page = get_page_from_raw(raw_page);
2252
2253- raw_page_size = VARSIZE(raw_page) - VARHDRSZ;
2254+ if (PageIsNew(page))
2255+ return page;
2256
2257- if (raw_page_size != BLCKSZ)
2258- ereport(ERROR,
2259- (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2260- errmsg("input page too small"),
2261- errdetail("Expected size %d, got %d",
2262- BLCKSZ, raw_page_size)));
2263-
2264- page = VARDATA(raw_page);
2265+ /* verify the special space has the expected size */
2266+ if (PageGetSpecialSize(page) != MAXALIGN(sizeof(BrinSpecialSpace)))
2267+ ereport(ERROR,
2268+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2269+ errmsg("input page is not a valid %s page", "BRIN"),
2270+ errdetail("Expected special size %d, got %d.",
2271+ (int) MAXALIGN(sizeof(BrinSpecialSpace)),
2272+ (int) PageGetSpecialSize(page))));
2273
2274 /* verify the special space says this page is what we want */
2275 if (BrinPageType(page) != type)
2276@@ -169,11 +176,25 @@ brin_page_items(PG_FUNCTION_ARGS)
2277 MemoryContextSwitchTo(oldcontext);
2278
2279 indexRel = index_open(indexRelid, AccessShareLock);
2280+
2281+ if (!IS_BRIN(indexRel))
2282+ ereport(ERROR,
2283+ (errcode(ERRCODE_WRONG_OBJECT_TYPE),
2284+ errmsg("\"%s\" is not a %s index",
2285+ RelationGetRelationName(indexRel), "BRIN")));
2286+
2287 bdesc = brin_build_desc(indexRel);
2288
2289 /* minimally verify the page we got */
2290 page = verify_brin_page(raw_page, BRIN_PAGETYPE_REGULAR, "regular");
2291
2292+ if (PageIsNew(page))
2293+ {
2294+ brin_free_desc(bdesc);
2295+ index_close(indexRel, AccessShareLock);
2296+ PG_RETURN_NULL();
2297+ }
2298+
2299 /*
2300 * Initialize output functions for all indexed datatypes; simplifies
2301 * calling them later.
2302@@ -340,6 +361,9 @@ brin_metapage_info(PG_FUNCTION_ARGS)
2303
2304 page = verify_brin_page(raw_page, BRIN_PAGETYPE_META, "metapage");
2305
2306+ if (PageIsNew(page))
2307+ PG_RETURN_NULL();
2308+
2309 /* Build a tuple descriptor for our result type */
2310 if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
2311 elog(ERROR, "return type must be a row type");
2312@@ -382,15 +406,21 @@ brin_revmap_data(PG_FUNCTION_ARGS)
2313 MemoryContext mctx;
2314 Page page;
2315
2316- /* minimally verify the page we got */
2317- page = verify_brin_page(raw_page, BRIN_PAGETYPE_REVMAP, "revmap");
2318-
2319 /* create a function context for cross-call persistence */
2320 fctx = SRF_FIRSTCALL_INIT();
2321
2322 /* switch to memory context appropriate for multiple function calls */
2323 mctx = MemoryContextSwitchTo(fctx->multi_call_memory_ctx);
2324
2325+ /* minimally verify the page we got */
2326+ page = verify_brin_page(raw_page, BRIN_PAGETYPE_REVMAP, "revmap");
2327+
2328+ if (PageIsNew(page))
2329+ {
2330+ MemoryContextSwitchTo(mctx);
2331+ PG_RETURN_NULL();
2332+ }
2333+
2334 state = palloc(sizeof(*state));
2335 state->tids = ((RevmapContents *) PageGetContents(page))->rm_tids;
2336 state->idx = 0;
2337diff --git a/contrib/pageinspect/btreefuncs.c b/contrib/pageinspect/btreefuncs.c
2338index e7a3230..3093aa8 100644
2339--- a/contrib/pageinspect/btreefuncs.c
2340+++ b/contrib/pageinspect/btreefuncs.c
2341@@ -184,8 +184,10 @@ bt_page_stats(PG_FUNCTION_ARGS)
2342 rel = relation_openrv(relrv, AccessShareLock);
2343
2344 if (!IS_INDEX(rel) || !IS_BTREE(rel))
2345- elog(ERROR, "relation \"%s\" is not a btree index",
2346- RelationGetRelationName(rel));
2347+ ereport(ERROR,
2348+ (errcode(ERRCODE_WRONG_OBJECT_TYPE),
2349+ errmsg("\"%s\" is not a %s index",
2350+ RelationGetRelationName(rel), "btree")));
2351
2352 /*
2353 * Reject attempts to read non-local temporary relations; we would be
2354@@ -434,8 +436,10 @@ bt_page_items(PG_FUNCTION_ARGS)
2355 rel = relation_openrv(relrv, AccessShareLock);
2356
2357 if (!IS_INDEX(rel) || !IS_BTREE(rel))
2358- elog(ERROR, "relation \"%s\" is not a btree index",
2359- RelationGetRelationName(rel));
2360+ ereport(ERROR,
2361+ (errcode(ERRCODE_WRONG_OBJECT_TYPE),
2362+ errmsg("\"%s\" is not a %s index",
2363+ RelationGetRelationName(rel), "btree")));
2364
2365 /*
2366 * Reject attempts to read non-local temporary relations; we would be
2367@@ -522,7 +526,6 @@ bt_page_items_bytea(PG_FUNCTION_ARGS)
2368 Datum result;
2369 FuncCallContext *fctx;
2370 struct user_args *uargs;
2371- int raw_page_size;
2372
2373 if (!superuser())
2374 ereport(ERROR,
2375@@ -535,22 +538,30 @@ bt_page_items_bytea(PG_FUNCTION_ARGS)
2376 MemoryContext mctx;
2377 TupleDesc tupleDesc;
2378
2379- raw_page_size = VARSIZE(raw_page) - VARHDRSZ;
2380-
2381- if (raw_page_size < SizeOfPageHeaderData)
2382- ereport(ERROR,
2383- (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2384- errmsg("input page too small (%d bytes)", raw_page_size)));
2385-
2386 fctx = SRF_FIRSTCALL_INIT();
2387 mctx = MemoryContextSwitchTo(fctx->multi_call_memory_ctx);
2388
2389 uargs = palloc(sizeof(struct user_args));
2390
2391- uargs->page = VARDATA(raw_page);
2392+ uargs->page = get_page_from_raw(raw_page);
2393+
2394+ if (PageIsNew(uargs->page))
2395+ {
2396+ MemoryContextSwitchTo(mctx);
2397+ PG_RETURN_NULL();
2398+ }
2399
2400 uargs->offset = FirstOffsetNumber;
2401
2402+ /* verify the special space has the expected size */
2403+ if (PageGetSpecialSize(uargs->page) != MAXALIGN(sizeof(BTPageOpaqueData)))
2404+ ereport(ERROR,
2405+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2406+ errmsg("input page is not a valid %s page", "btree"),
2407+ errdetail("Expected special size %d, got %d.",
2408+ (int) MAXALIGN(sizeof(BTPageOpaqueData)),
2409+ (int) PageGetSpecialSize(uargs->page))));
2410+
2411 opaque = (BTPageOpaque) PageGetSpecialPointer(uargs->page);
2412
2413 if (P_ISMETA(opaque))
2414@@ -558,6 +569,11 @@ bt_page_items_bytea(PG_FUNCTION_ARGS)
2415 (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2416 errmsg("block is a meta page")));
2417
2418+ if (P_ISLEAF(opaque) && opaque->btpo.level != 0)
2419+ ereport(ERROR,
2420+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2421+ errmsg("block is not a valid btree leaf page")));
2422+
2423 if (P_ISDELETED(opaque))
2424 elog(NOTICE, "page is deleted");
2425
2426@@ -625,8 +641,10 @@ bt_metap(PG_FUNCTION_ARGS)
2427 rel = relation_openrv(relrv, AccessShareLock);
2428
2429 if (!IS_INDEX(rel) || !IS_BTREE(rel))
2430- elog(ERROR, "relation \"%s\" is not a btree index",
2431- RelationGetRelationName(rel));
2432+ ereport(ERROR,
2433+ (errcode(ERRCODE_WRONG_OBJECT_TYPE),
2434+ errmsg("\"%s\" is not a %s index",
2435+ RelationGetRelationName(rel), "btree")));
2436
2437 /*
2438 * Reject attempts to read non-local temporary relations; we would be
2439diff --git a/contrib/pageinspect/expected/brin.out b/contrib/pageinspect/expected/brin.out
2440index 71eb190..d19cdc3 100644
2441--- a/contrib/pageinspect/expected/brin.out
2442+++ b/contrib/pageinspect/expected/brin.out
2443@@ -48,4 +48,43 @@ SELECT * FROM brin_page_items(get_raw_page('test1_a_idx', 2), 'test1_a_idx')
2444 1 | 0 | 1 | f | f | f | {1 .. 1}
2445 (1 row)
2446
2447+-- Failure for non-BRIN index.
2448+CREATE INDEX test1_a_btree ON test1 (a);
2449+SELECT brin_page_items(get_raw_page('test1_a_btree', 0), 'test1_a_btree');
2450+ERROR: "test1_a_btree" is not a BRIN index
2451+-- Mask DETAIL messages as these are not portable across architectures.
2452+\set VERBOSITY terse
2453+-- Invalid special area size
2454+SELECT brin_page_type(get_raw_page('test1', 0));
2455+ERROR: input page is not a valid BRIN page
2456+SELECT * FROM brin_metapage_info(get_raw_page('test1', 0));
2457+ERROR: input page is not a valid BRIN page
2458+SELECT * FROM brin_revmap_data(get_raw_page('test1', 0));
2459+ERROR: input page is not a valid BRIN page
2460+\set VERBOSITY default
2461+-- Tests with all-zero pages.
2462+SHOW block_size \gset
2463+SELECT brin_page_type(decode(repeat('00', :block_size), 'hex'));
2464+ brin_page_type
2465+----------------
2466+
2467+(1 row)
2468+
2469+SELECT brin_page_items(decode(repeat('00', :block_size), 'hex'), 'test1_a_idx');
2470+ brin_page_items
2471+-----------------
2472+(0 rows)
2473+
2474+SELECT brin_metapage_info(decode(repeat('00', :block_size), 'hex'));
2475+ brin_metapage_info
2476+--------------------
2477+
2478+(1 row)
2479+
2480+SELECT brin_revmap_data(decode(repeat('00', :block_size), 'hex'));
2481+ brin_revmap_data
2482+------------------
2483+
2484+(1 row)
2485+
2486 DROP TABLE test1;
2487diff --git a/contrib/pageinspect/expected/btree.out b/contrib/pageinspect/expected/btree.out
2488index 17bf0c5..f6eba98 100644
2489--- a/contrib/pageinspect/expected/btree.out
2490+++ b/contrib/pageinspect/expected/btree.out
2491@@ -1,5 +1,5 @@
2492-CREATE TABLE test1 (a int8, b text);
2493-INSERT INTO test1 VALUES (72057594037927937, 'text');
2494+CREATE TABLE test1 (a int8, b int4range);
2495+INSERT INTO test1 VALUES (72057594037927937, '[0,1)');
2496 CREATE INDEX test1_a_idx ON test1 USING btree (a);
2497 \x
2498 SELECT * FROM bt_metap('test1_a_idx');
2499@@ -64,4 +64,39 @@ tids |
2500
2501 SELECT * FROM bt_page_items(get_raw_page('test1_a_idx', 2));
2502 ERROR: block number 2 is out of range for relation "test1_a_idx"
2503+-- Failure when using a non-btree index.
2504+CREATE INDEX test1_a_hash ON test1 USING hash(a);
2505+SELECT bt_metap('test1_a_hash');
2506+ERROR: "test1_a_hash" is not a btree index
2507+SELECT bt_page_stats('test1_a_hash', 0);
2508+ERROR: "test1_a_hash" is not a btree index
2509+SELECT bt_page_items('test1_a_hash', 0);
2510+ERROR: "test1_a_hash" is not a btree index
2511+SELECT bt_page_items(get_raw_page('test1_a_hash', 0));
2512+ERROR: block is a meta page
2513+CREATE INDEX test1_b_gist ON test1 USING gist(b);
2514+-- Special area of GiST is the same as btree, this complains about inconsistent
2515+-- leaf data on the page.
2516+SELECT bt_page_items(get_raw_page('test1_b_gist', 0));
2517+ERROR: block is not a valid btree leaf page
2518+-- Several failure modes.
2519+-- Suppress the DETAIL message, to allow the tests to work across various
2520+-- page sizes and architectures.
2521+\set VERBOSITY terse
2522+-- invalid page size
2523+SELECT bt_page_items('aaa'::bytea);
2524+ERROR: invalid page size
2525+-- invalid special area size
2526+CREATE INDEX test1_a_brin ON test1 USING brin(a);
2527+SELECT bt_page_items(get_raw_page('test1', 0));
2528+ERROR: input page is not a valid btree page
2529+SELECT bt_page_items(get_raw_page('test1_a_brin', 0));
2530+ERROR: input page is not a valid btree page
2531+\set VERBOSITY default
2532+-- Tests with all-zero pages.
2533+SHOW block_size \gset
2534+SELECT bt_page_items(decode(repeat('00', :block_size), 'hex'));
2535+-[ RECORD 1 ]-+-
2536+bt_page_items |
2537+
2538 DROP TABLE test1;
2539diff --git a/contrib/pageinspect/expected/gin.out b/contrib/pageinspect/expected/gin.out
2540index 82f63b2..5f49ff5 100644
2541--- a/contrib/pageinspect/expected/gin.out
2542+++ b/contrib/pageinspect/expected/gin.out
2543@@ -35,3 +35,36 @@ FROM gin_leafpage_items(get_raw_page('test1_y_idx',
2544 -[ RECORD 1 ]
2545 ?column? | t
2546
2547+-- Failure with various modes.
2548+-- Suppress the DETAIL message, to allow the tests to work across various
2549+-- page sizes and architectures.
2550+\set VERBOSITY terse
2551+-- invalid page size
2552+SELECT gin_leafpage_items('aaa'::bytea);
2553+ERROR: invalid page size
2554+SELECT gin_metapage_info('bbb'::bytea);
2555+ERROR: invalid page size
2556+SELECT gin_page_opaque_info('ccc'::bytea);
2557+ERROR: invalid page size
2558+-- invalid special area size
2559+SELECT * FROM gin_metapage_info(get_raw_page('test1', 0));
2560+ERROR: input page is not a valid GIN metapage
2561+SELECT * FROM gin_page_opaque_info(get_raw_page('test1', 0));
2562+ERROR: input page is not a valid GIN data leaf page
2563+SELECT * FROM gin_leafpage_items(get_raw_page('test1', 0));
2564+ERROR: input page is not a valid GIN data leaf page
2565+\set VERBOSITY default
2566+-- Tests with all-zero pages.
2567+SHOW block_size \gset
2568+SELECT gin_leafpage_items(decode(repeat('00', :block_size), 'hex'));
2569+-[ RECORD 1 ]------+-
2570+gin_leafpage_items |
2571+
2572+SELECT gin_metapage_info(decode(repeat('00', :block_size), 'hex'));
2573+-[ RECORD 1 ]-----+-
2574+gin_metapage_info |
2575+
2576+SELECT gin_page_opaque_info(decode(repeat('00', :block_size), 'hex'));
2577+-[ RECORD 1 ]--------+-
2578+gin_page_opaque_info |
2579+
2580diff --git a/contrib/pageinspect/expected/hash.out b/contrib/pageinspect/expected/hash.out
2581index 75d7bcf..82f1875 100644
2582--- a/contrib/pageinspect/expected/hash.out
2583+++ b/contrib/pageinspect/expected/hash.out
2584@@ -159,4 +159,43 @@ SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 4));
2585
2586 SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 5));
2587 ERROR: page is not a hash bucket or overflow page
2588+-- Failure with non-hash index
2589+CREATE INDEX test_hash_a_btree ON test_hash USING btree (a);
2590+SELECT hash_bitmap_info('test_hash_a_btree', 0);
2591+ERROR: "test_hash_a_btree" is not a hash index
2592+-- Failure with various modes.
2593+-- Suppress the DETAIL message, to allow the tests to work across various
2594+-- page sizes and architectures.
2595+\set VERBOSITY terse
2596+-- invalid page size
2597+SELECT hash_metapage_info('aaa'::bytea);
2598+ERROR: invalid page size
2599+SELECT hash_page_items('bbb'::bytea);
2600+ERROR: invalid page size
2601+SELECT hash_page_stats('ccc'::bytea);
2602+ERROR: invalid page size
2603+SELECT hash_page_type('ddd'::bytea);
2604+ERROR: invalid page size
2605+-- invalid special area size
2606+SELECT hash_metapage_info(get_raw_page('test_hash', 0));
2607+ERROR: input page is not a valid hash page
2608+SELECT hash_page_items(get_raw_page('test_hash', 0));
2609+ERROR: input page is not a valid hash page
2610+SELECT hash_page_stats(get_raw_page('test_hash', 0));
2611+ERROR: input page is not a valid hash page
2612+SELECT hash_page_type(get_raw_page('test_hash', 0));
2613+ERROR: input page is not a valid hash page
2614+\set VERBOSITY default
2615+-- Tests with all-zero pages.
2616+SHOW block_size \gset
2617+SELECT hash_metapage_info(decode(repeat('00', :block_size), 'hex'));
2618+ERROR: page is not a hash meta page
2619+SELECT hash_page_items(decode(repeat('00', :block_size), 'hex'));
2620+ERROR: page is not a hash bucket or overflow page
2621+SELECT hash_page_stats(decode(repeat('00', :block_size), 'hex'));
2622+ERROR: page is not a hash bucket or overflow page
2623+SELECT hash_page_type(decode(repeat('00', :block_size), 'hex'));
2624+-[ RECORD 1 ]--+-------
2625+hash_page_type | unused
2626+
2627 DROP TABLE test_hash;
2628diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out
2629index 29ea911..717cecc 100644
2630--- a/contrib/pageinspect/expected/page.out
2631+++ b/contrib/pageinspect/expected/page.out
2632@@ -201,3 +201,34 @@ select tuple_data_split('test8'::regclass, t_data, t_infomask, t_infomask2, t_bi
2633 (1 row)
2634
2635 drop table test8;
2636+-- Failure with incorrect page size
2637+-- Suppress the DETAIL message, to allow the tests to work across various
2638+-- page sizes.
2639+\set VERBOSITY terse
2640+SELECT fsm_page_contents('aaa'::bytea);
2641+ERROR: invalid page size
2642+SELECT page_checksum('bbb'::bytea, 0);
2643+ERROR: invalid page size
2644+SELECT page_header('ccc'::bytea);
2645+ERROR: invalid page size
2646+\set VERBOSITY default
2647+-- Tests with all-zero pages.
2648+SHOW block_size \gset
2649+SELECT fsm_page_contents(decode(repeat('00', :block_size), 'hex'));
2650+ fsm_page_contents
2651+-------------------
2652+
2653+(1 row)
2654+
2655+SELECT page_header(decode(repeat('00', :block_size), 'hex'));
2656+ page_header
2657+-----------------------
2658+ (0/0,0,0,0,0,0,0,0,0)
2659+(1 row)
2660+
2661+SELECT page_checksum(decode(repeat('00', :block_size), 'hex'), 1);
2662+ page_checksum
2663+---------------
2664+
2665+(1 row)
2666+
2667diff --git a/contrib/pageinspect/fsmfuncs.c b/contrib/pageinspect/fsmfuncs.c
2668index 099acbb..c1d0ea3 100644
2669--- a/contrib/pageinspect/fsmfuncs.c
2670+++ b/contrib/pageinspect/fsmfuncs.c
2671@@ -36,6 +36,7 @@ fsm_page_contents(PG_FUNCTION_ARGS)
2672 {
2673 bytea *raw_page = PG_GETARG_BYTEA_P(0);
2674 StringInfoData sinfo;
2675+ Page page;
2676 FSMPage fsmpage;
2677 int i;
2678
2679@@ -44,7 +45,12 @@ fsm_page_contents(PG_FUNCTION_ARGS)
2680 (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
2681 errmsg("must be superuser to use raw page functions")));
2682
2683- fsmpage = (FSMPage) PageGetContents(VARDATA(raw_page));
2684+ page = get_page_from_raw(raw_page);
2685+
2686+ if (PageIsNew(page))
2687+ PG_RETURN_NULL();
2688+
2689+ fsmpage = (FSMPage) PageGetContents(page);
2690
2691 initStringInfo(&sinfo);
2692
2693diff --git a/contrib/pageinspect/ginfuncs.c b/contrib/pageinspect/ginfuncs.c
2694index 7114735..1b482a0 100644
2695--- a/contrib/pageinspect/ginfuncs.c
2696+++ b/contrib/pageinspect/ginfuncs.c
2697@@ -49,6 +49,17 @@ gin_metapage_info(PG_FUNCTION_ARGS)
2698
2699 page = get_page_from_raw(raw_page);
2700
2701+ if (PageIsNew(page))
2702+ PG_RETURN_NULL();
2703+
2704+ if (PageGetSpecialSize(page) != MAXALIGN(sizeof(GinPageOpaqueData)))
2705+ ereport(ERROR,
2706+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2707+ errmsg("input page is not a valid GIN metapage"),
2708+ errdetail("Expected special size %d, got %d.",
2709+ (int) MAXALIGN(sizeof(GinPageOpaqueData)),
2710+ (int) PageGetSpecialSize(page))));
2711+
2712 opaq = (GinPageOpaque) PageGetSpecialPointer(page);
2713 if (opaq->flags != GIN_META)
2714 ereport(ERROR,
2715@@ -107,6 +118,17 @@ gin_page_opaque_info(PG_FUNCTION_ARGS)
2716
2717 page = get_page_from_raw(raw_page);
2718
2719+ if (PageIsNew(page))
2720+ PG_RETURN_NULL();
2721+
2722+ if (PageGetSpecialSize(page) != MAXALIGN(sizeof(GinPageOpaqueData)))
2723+ ereport(ERROR,
2724+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2725+ errmsg("input page is not a valid GIN data leaf page"),
2726+ errdetail("Expected special size %d, got %d.",
2727+ (int) MAXALIGN(sizeof(GinPageOpaqueData)),
2728+ (int) PageGetSpecialSize(page))));
2729+
2730 opaq = (GinPageOpaque) PageGetSpecialPointer(page);
2731
2732 /* Build a tuple descriptor for our result type */
2733@@ -184,13 +206,19 @@ gin_leafpage_items(PG_FUNCTION_ARGS)
2734
2735 page = get_page_from_raw(raw_page);
2736
2737+ if (PageIsNew(page))
2738+ {
2739+ MemoryContextSwitchTo(mctx);
2740+ PG_RETURN_NULL();
2741+ }
2742+
2743 if (PageGetSpecialSize(page) != MAXALIGN(sizeof(GinPageOpaqueData)))
2744 ereport(ERROR,
2745 (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2746 errmsg("input page is not a valid GIN data leaf page"),
2747- errdetail("Special size %d, expected %d",
2748- (int) PageGetSpecialSize(page),
2749- (int) MAXALIGN(sizeof(GinPageOpaqueData)))));
2750+ errdetail("Expected special size %d, got %d.",
2751+ (int) MAXALIGN(sizeof(GinPageOpaqueData)),
2752+ (int) PageGetSpecialSize(page))));
2753
2754 opaq = (GinPageOpaque) PageGetSpecialPointer(page);
2755 if (opaq->flags != (GIN_DATA | GIN_LEAF | GIN_COMPRESSED))
2756diff --git a/contrib/pageinspect/hashfuncs.c b/contrib/pageinspect/hashfuncs.c
2757index 3b2f033..e292117 100644
2758--- a/contrib/pageinspect/hashfuncs.c
2759+++ b/contrib/pageinspect/hashfuncs.c
2760@@ -66,14 +66,17 @@ verify_hash_page(bytea *raw_page, int flags)
2761
2762 if (PageGetSpecialSize(page) != MAXALIGN(sizeof(HashPageOpaqueData)))
2763 ereport(ERROR,
2764- (errcode(ERRCODE_INDEX_CORRUPTED),
2765- errmsg("index table contains corrupted page")));
2766+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2767+ errmsg("input page is not a valid %s page", "hash"),
2768+ errdetail("Expected special size %d, got %d.",
2769+ (int) MAXALIGN(sizeof(HashPageOpaqueData)),
2770+ (int) PageGetSpecialSize(page))));
2771
2772 pageopaque = (HashPageOpaque) PageGetSpecialPointer(page);
2773 if (pageopaque->hasho_page_id != HASHO_PAGE_ID)
2774 ereport(ERROR,
2775 (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2776- errmsg("page is not a hash page"),
2777+ errmsg("input page is not a valid %s page", "hash"),
2778 errdetail("Expected %08x, got %08x.",
2779 HASHO_PAGE_ID, pageopaque->hasho_page_id)));
2780
2781@@ -134,7 +137,7 @@ verify_hash_page(bytea *raw_page, int flags)
2782 ereport(ERROR,
2783 (errcode(ERRCODE_INDEX_CORRUPTED),
2784 errmsg("invalid version for metadata"),
2785- errdetail("Expected %d, got %d",
2786+ errdetail("Expected %d, got %d.",
2787 HASH_VERSION, metap->hashm_version)));
2788 }
2789
2790@@ -417,8 +420,10 @@ hash_bitmap_info(PG_FUNCTION_ARGS)
2791 indexRel = index_open(indexRelid, AccessShareLock);
2792
2793 if (!IS_HASH(indexRel))
2794- elog(ERROR, "relation \"%s\" is not a hash index",
2795- RelationGetRelationName(indexRel));
2796+ ereport(ERROR,
2797+ (errcode(ERRCODE_WRONG_OBJECT_TYPE),
2798+ errmsg("\"%s\" is not a %s index",
2799+ RelationGetRelationName(indexRel), "hash")));
2800
2801 if (RELATION_IS_OTHER_TEMP(indexRel))
2802 ereport(ERROR,
2803diff --git a/contrib/pageinspect/rawpage.c b/contrib/pageinspect/rawpage.c
2804index c018150..0e2799b 100644
2805--- a/contrib/pageinspect/rawpage.c
2806+++ b/contrib/pageinspect/rawpage.c
2807@@ -218,7 +218,6 @@ Datum
2808 page_header(PG_FUNCTION_ARGS)
2809 {
2810 bytea *raw_page = PG_GETARG_BYTEA_P(0);
2811- int raw_page_size;
2812
2813 TupleDesc tupdesc;
2814
2815@@ -235,18 +234,7 @@ page_header(PG_FUNCTION_ARGS)
2816 (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
2817 errmsg("must be superuser to use raw page functions")));
2818
2819- raw_page_size = VARSIZE(raw_page) - VARHDRSZ;
2820-
2821- /*
2822- * Check that enough data was supplied, so that we don't try to access
2823- * fields outside the supplied buffer.
2824- */
2825- if (raw_page_size < SizeOfPageHeaderData)
2826- ereport(ERROR,
2827- (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2828- errmsg("input page too small (%d bytes)", raw_page_size)));
2829-
2830- page = (PageHeader) VARDATA(raw_page);
2831+ page = (PageHeader) get_page_from_raw(raw_page);
2832
2833 /* Build a tuple descriptor for our result type */
2834 if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
2835@@ -299,25 +287,17 @@ page_checksum(PG_FUNCTION_ARGS)
2836 {
2837 bytea *raw_page = PG_GETARG_BYTEA_P(0);
2838 uint32 blkno = PG_GETARG_INT32(1);
2839- int raw_page_size;
2840- PageHeader page;
2841+ Page page;
2842
2843 if (!superuser())
2844 ereport(ERROR,
2845 (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
2846 errmsg("must be superuser to use raw page functions")));
2847
2848- raw_page_size = VARSIZE(raw_page) - VARHDRSZ;
2849-
2850- /*
2851- * Check that the supplied page is of the right size.
2852- */
2853- if (raw_page_size != BLCKSZ)
2854- ereport(ERROR,
2855- (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2856- errmsg("incorrect size of input page (%d bytes)", raw_page_size)));
2857+ page = get_page_from_raw(raw_page);
2858
2859- page = (PageHeader) VARDATA(raw_page);
2860+ if (PageIsNew(page))
2861+ PG_RETURN_NULL();
2862
2863 PG_RETURN_INT16(pg_checksum_page((char *) page, blkno));
2864 }
2865diff --git a/contrib/pageinspect/sql/brin.sql b/contrib/pageinspect/sql/brin.sql
2866index 735bc3b..45098c1 100644
2867--- a/contrib/pageinspect/sql/brin.sql
2868+++ b/contrib/pageinspect/sql/brin.sql
2869@@ -15,4 +15,23 @@ SELECT * FROM brin_revmap_data(get_raw_page('test1_a_idx', 1)) LIMIT 5;
2870 SELECT * FROM brin_page_items(get_raw_page('test1_a_idx', 2), 'test1_a_idx')
2871 ORDER BY blknum, attnum LIMIT 5;
2872
2873+-- Failure for non-BRIN index.
2874+CREATE INDEX test1_a_btree ON test1 (a);
2875+SELECT brin_page_items(get_raw_page('test1_a_btree', 0), 'test1_a_btree');
2876+
2877+-- Mask DETAIL messages as these are not portable across architectures.
2878+\set VERBOSITY terse
2879+-- Invalid special area size
2880+SELECT brin_page_type(get_raw_page('test1', 0));
2881+SELECT * FROM brin_metapage_info(get_raw_page('test1', 0));
2882+SELECT * FROM brin_revmap_data(get_raw_page('test1', 0));
2883+\set VERBOSITY default
2884+
2885+-- Tests with all-zero pages.
2886+SHOW block_size \gset
2887+SELECT brin_page_type(decode(repeat('00', :block_size), 'hex'));
2888+SELECT brin_page_items(decode(repeat('00', :block_size), 'hex'), 'test1_a_idx');
2889+SELECT brin_metapage_info(decode(repeat('00', :block_size), 'hex'));
2890+SELECT brin_revmap_data(decode(repeat('00', :block_size), 'hex'));
2891+
2892 DROP TABLE test1;
2893diff --git a/contrib/pageinspect/sql/btree.sql b/contrib/pageinspect/sql/btree.sql
2894index 8eac64c..75587c1 100644
2895--- a/contrib/pageinspect/sql/btree.sql
2896+++ b/contrib/pageinspect/sql/btree.sql
2897@@ -1,5 +1,5 @@
2898-CREATE TABLE test1 (a int8, b text);
2899-INSERT INTO test1 VALUES (72057594037927937, 'text');
2900+CREATE TABLE test1 (a int8, b int4range);
2901+INSERT INTO test1 VALUES (72057594037927937, '[0,1)');
2902 CREATE INDEX test1_a_idx ON test1 USING btree (a);
2903
2904 \x
2905@@ -18,4 +18,31 @@ SELECT * FROM bt_page_items(get_raw_page('test1_a_idx', 0));
2906 SELECT * FROM bt_page_items(get_raw_page('test1_a_idx', 1));
2907 SELECT * FROM bt_page_items(get_raw_page('test1_a_idx', 2));
2908
2909+-- Failure when using a non-btree index.
2910+CREATE INDEX test1_a_hash ON test1 USING hash(a);
2911+SELECT bt_metap('test1_a_hash');
2912+SELECT bt_page_stats('test1_a_hash', 0);
2913+SELECT bt_page_items('test1_a_hash', 0);
2914+SELECT bt_page_items(get_raw_page('test1_a_hash', 0));
2915+CREATE INDEX test1_b_gist ON test1 USING gist(b);
2916+-- Special area of GiST is the same as btree, this complains about inconsistent
2917+-- leaf data on the page.
2918+SELECT bt_page_items(get_raw_page('test1_b_gist', 0));
2919+
2920+-- Several failure modes.
2921+-- Suppress the DETAIL message, to allow the tests to work across various
2922+-- page sizes and architectures.
2923+\set VERBOSITY terse
2924+-- invalid page size
2925+SELECT bt_page_items('aaa'::bytea);
2926+-- invalid special area size
2927+CREATE INDEX test1_a_brin ON test1 USING brin(a);
2928+SELECT bt_page_items(get_raw_page('test1', 0));
2929+SELECT bt_page_items(get_raw_page('test1_a_brin', 0));
2930+\set VERBOSITY default
2931+
2932+-- Tests with all-zero pages.
2933+SHOW block_size \gset
2934+SELECT bt_page_items(decode(repeat('00', :block_size), 'hex'));
2935+
2936 DROP TABLE test1;
2937diff --git a/contrib/pageinspect/sql/gin.sql b/contrib/pageinspect/sql/gin.sql
2938index d516ed3..b0c20c0 100644
2939--- a/contrib/pageinspect/sql/gin.sql
2940+++ b/contrib/pageinspect/sql/gin.sql
2941@@ -17,3 +17,23 @@ SELECT COUNT(*) > 0
2942 FROM gin_leafpage_items(get_raw_page('test1_y_idx',
2943 (pg_relation_size('test1_y_idx') /
2944 current_setting('block_size')::bigint)::int - 1));
2945+
2946+-- Failure with various modes.
2947+-- Suppress the DETAIL message, to allow the tests to work across various
2948+-- page sizes and architectures.
2949+\set VERBOSITY terse
2950+-- invalid page size
2951+SELECT gin_leafpage_items('aaa'::bytea);
2952+SELECT gin_metapage_info('bbb'::bytea);
2953+SELECT gin_page_opaque_info('ccc'::bytea);
2954+-- invalid special area size
2955+SELECT * FROM gin_metapage_info(get_raw_page('test1', 0));
2956+SELECT * FROM gin_page_opaque_info(get_raw_page('test1', 0));
2957+SELECT * FROM gin_leafpage_items(get_raw_page('test1', 0));
2958+\set VERBOSITY default
2959+
2960+-- Tests with all-zero pages.
2961+SHOW block_size \gset
2962+SELECT gin_leafpage_items(decode(repeat('00', :block_size), 'hex'));
2963+SELECT gin_metapage_info(decode(repeat('00', :block_size), 'hex'));
2964+SELECT gin_page_opaque_info(decode(repeat('00', :block_size), 'hex'));
2965diff --git a/contrib/pageinspect/sql/hash.sql b/contrib/pageinspect/sql/hash.sql
2966index 87ee549..3acdc7d 100644
2967--- a/contrib/pageinspect/sql/hash.sql
2968+++ b/contrib/pageinspect/sql/hash.sql
2969@@ -76,5 +76,31 @@ SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 3));
2970 SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 4));
2971 SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 5));
2972
2973+-- Failure with non-hash index
2974+CREATE INDEX test_hash_a_btree ON test_hash USING btree (a);
2975+SELECT hash_bitmap_info('test_hash_a_btree', 0);
2976+
2977+-- Failure with various modes.
2978+-- Suppress the DETAIL message, to allow the tests to work across various
2979+-- page sizes and architectures.
2980+\set VERBOSITY terse
2981+-- invalid page size
2982+SELECT hash_metapage_info('aaa'::bytea);
2983+SELECT hash_page_items('bbb'::bytea);
2984+SELECT hash_page_stats('ccc'::bytea);
2985+SELECT hash_page_type('ddd'::bytea);
2986+-- invalid special area size
2987+SELECT hash_metapage_info(get_raw_page('test_hash', 0));
2988+SELECT hash_page_items(get_raw_page('test_hash', 0));
2989+SELECT hash_page_stats(get_raw_page('test_hash', 0));
2990+SELECT hash_page_type(get_raw_page('test_hash', 0));
2991+\set VERBOSITY default
2992+
2993+-- Tests with all-zero pages.
2994+SHOW block_size \gset
2995+SELECT hash_metapage_info(decode(repeat('00', :block_size), 'hex'));
2996+SELECT hash_page_items(decode(repeat('00', :block_size), 'hex'));
2997+SELECT hash_page_stats(decode(repeat('00', :block_size), 'hex'));
2998+SELECT hash_page_type(decode(repeat('00', :block_size), 'hex'));
2999
3000 DROP TABLE test_hash;
3001diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql
3002index 9a3bc95..172f252 100644
3003--- a/contrib/pageinspect/sql/page.sql
3004+++ b/contrib/pageinspect/sql/page.sql
3005@@ -80,3 +80,18 @@ select t_bits, t_data from heap_page_items(get_raw_page('test8', 0));
3006 select tuple_data_split('test8'::regclass, t_data, t_infomask, t_infomask2, t_bits)
3007 from heap_page_items(get_raw_page('test8', 0));
3008 drop table test8;
3009+
3010+-- Failure with incorrect page size
3011+-- Suppress the DETAIL message, to allow the tests to work across various
3012+-- page sizes.
3013+\set VERBOSITY terse
3014+SELECT fsm_page_contents('aaa'::bytea);
3015+SELECT page_checksum('bbb'::bytea, 0);
3016+SELECT page_header('ccc'::bytea);
3017+\set VERBOSITY default
3018+
3019+-- Tests with all-zero pages.
3020+SHOW block_size \gset
3021+SELECT fsm_page_contents(decode(repeat('00', :block_size), 'hex'));
3022+SELECT page_header(decode(repeat('00', :block_size), 'hex'));
3023+SELECT page_checksum(decode(repeat('00', :block_size), 'hex'), 1);
3024diff --git a/contrib/pgcrypto/px.c b/contrib/pgcrypto/px.c
3025index 2c6704e..e4fbfd7 100644
3026--- a/contrib/pgcrypto/px.c
3027+++ b/contrib/pgcrypto/px.c
3028@@ -200,7 +200,7 @@ combo_init(PX_Combo *cx, const uint8 *key, unsigned klen,
3029 memset(ivbuf, 0, ivs);
3030 if (ivlen > ivs)
3031 memcpy(ivbuf, iv, ivs);
3032- else
3033+ else if (ivlen > 0)
3034 memcpy(ivbuf, iv, ivlen);
3035 }
3036
3037diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c
3038index 2029036..80c6f0f 100644
3039--- a/contrib/postgres_fdw/deparse.c
3040+++ b/contrib/postgres_fdw/deparse.c
3041@@ -40,6 +40,7 @@
3042 #include "catalog/pg_collation.h"
3043 #include "catalog/pg_namespace.h"
3044 #include "catalog/pg_operator.h"
3045+#include "catalog/pg_opfamily.h"
3046 #include "catalog/pg_proc.h"
3047 #include "catalog/pg_type.h"
3048 #include "commands/defrem.h"
3049@@ -179,6 +180,8 @@ static void deparseRangeTblRef(StringInfo buf, PlannerInfo *root,
3050 Index ignore_rel, List **ignore_conds, List **params_list);
3051 static void deparseAggref(Aggref *node, deparse_expr_cxt *context);
3052 static void appendGroupByClause(List *tlist, deparse_expr_cxt *context);
3053+static void appendOrderBySuffix(Oid sortop, Oid sortcoltype, bool nulls_first,
3054+ deparse_expr_cxt *context);
3055 static void appendAggOrderBy(List *orderList, List *targetList,
3056 deparse_expr_cxt *context);
3057 static void appendFunctionName(Oid funcid, deparse_expr_cxt *context);
3058@@ -905,6 +908,33 @@ is_foreign_param(PlannerInfo *root,
3059 }
3060
3061 /*
3062+ * Returns true if it's safe to push down the sort expression described by
3063+ * 'pathkey' to the foreign server.
3064+ */
3065+bool
3066+is_foreign_pathkey(PlannerInfo *root,
3067+ RelOptInfo *baserel,
3068+ PathKey *pathkey)
3069+{
3070+ EquivalenceClass *pathkey_ec = pathkey->pk_eclass;
3071+ PgFdwRelationInfo *fpinfo = (PgFdwRelationInfo *) baserel->fdw_private;
3072+
3073+ /*
3074+ * is_foreign_expr would detect volatile expressions as well, but checking
3075+ * ec_has_volatile here saves some cycles.
3076+ */
3077+ if (pathkey_ec->ec_has_volatile)
3078+ return false;
3079+
3080+ /* can't push down the sort if the pathkey's opfamily is not shippable */
3081+ if (!is_shippable(pathkey->pk_opfamily, OperatorFamilyRelationId, fpinfo))
3082+ return false;
3083+
3084+ /* can push if a suitable EC member exists */
3085+ return (find_em_for_rel(root, pathkey_ec, baserel) != NULL);
3086+}
3087+
3088+/*
3089 * Convert type OID + typmod info into a type name we can ship to the remote
3090 * server. Someplace else had better have verified that this type name is
3091 * expected to be known on the remote end.
3092@@ -3070,44 +3100,59 @@ appendAggOrderBy(List *orderList, List *targetList, deparse_expr_cxt *context)
3093 {
3094 SortGroupClause *srt = (SortGroupClause *) lfirst(lc);
3095 Node *sortexpr;
3096- Oid sortcoltype;
3097- TypeCacheEntry *typentry;
3098
3099 if (!first)
3100 appendStringInfoString(buf, ", ");
3101 first = false;
3102
3103+ /* Deparse the sort expression proper. */
3104 sortexpr = deparseSortGroupClause(srt->tleSortGroupRef, targetList,
3105 false, context);
3106- sortcoltype = exprType(sortexpr);
3107- /* See whether operator is default < or > for datatype */
3108- typentry = lookup_type_cache(sortcoltype,
3109- TYPECACHE_LT_OPR | TYPECACHE_GT_OPR);
3110- if (srt->sortop == typentry->lt_opr)
3111- appendStringInfoString(buf, " ASC");
3112- else if (srt->sortop == typentry->gt_opr)
3113- appendStringInfoString(buf, " DESC");
3114- else
3115- {
3116- HeapTuple opertup;
3117- Form_pg_operator operform;
3118-
3119- appendStringInfoString(buf, " USING ");
3120-
3121- /* Append operator name. */
3122- opertup = SearchSysCache1(OPEROID, ObjectIdGetDatum(srt->sortop));
3123- if (!HeapTupleIsValid(opertup))
3124- elog(ERROR, "cache lookup failed for operator %u", srt->sortop);
3125- operform = (Form_pg_operator) GETSTRUCT(opertup);
3126- deparseOperatorName(buf, operform);
3127- ReleaseSysCache(opertup);
3128- }
3129+ /* Add decoration as needed. */
3130+ appendOrderBySuffix(srt->sortop, exprType(sortexpr), srt->nulls_first,
3131+ context);
3132+ }
3133+}
3134
3135- if (srt->nulls_first)
3136- appendStringInfoString(buf, " NULLS FIRST");
3137- else
3138- appendStringInfoString(buf, " NULLS LAST");
3139+/*
3140+ * Append the ASC, DESC, USING <OPERATOR> and NULLS FIRST / NULLS LAST parts
3141+ * of an ORDER BY clause.
3142+ */
3143+static void
3144+appendOrderBySuffix(Oid sortop, Oid sortcoltype, bool nulls_first,
3145+ deparse_expr_cxt *context)
3146+{
3147+ StringInfo buf = context->buf;
3148+ TypeCacheEntry *typentry;
3149+
3150+ /* See whether operator is default < or > for sort expr's datatype. */
3151+ typentry = lookup_type_cache(sortcoltype,
3152+ TYPECACHE_LT_OPR | TYPECACHE_GT_OPR);
3153+
3154+ if (sortop == typentry->lt_opr)
3155+ appendStringInfoString(buf, " ASC");
3156+ else if (sortop == typentry->gt_opr)
3157+ appendStringInfoString(buf, " DESC");
3158+ else
3159+ {
3160+ HeapTuple opertup;
3161+ Form_pg_operator operform;
3162+
3163+ appendStringInfoString(buf, " USING ");
3164+
3165+ /* Append operator name. */
3166+ opertup = SearchSysCache1(OPEROID, ObjectIdGetDatum(sortop));
3167+ if (!HeapTupleIsValid(opertup))
3168+ elog(ERROR, "cache lookup failed for operator %u", sortop);
3169+ operform = (Form_pg_operator) GETSTRUCT(opertup);
3170+ deparseOperatorName(buf, operform);
3171+ ReleaseSysCache(opertup);
3172 }
3173+
3174+ if (nulls_first)
3175+ appendStringInfoString(buf, " NULLS FIRST");
3176+ else
3177+ appendStringInfoString(buf, " NULLS LAST");
3178 }
3179
3180 /*
3181@@ -3190,9 +3235,13 @@ appendGroupByClause(List *tlist, deparse_expr_cxt *context)
3182 }
3183
3184 /*
3185- * Deparse ORDER BY clause according to the given pathkeys for given base
3186- * relation. From given pathkeys expressions belonging entirely to the given
3187- * base relation are obtained and deparsed.
3188+ * Deparse ORDER BY clause defined by the given pathkeys.
3189+ *
3190+ * The clause should use Vars from context->scanrel if !has_final_sort,
3191+ * or from context->foreignrel's targetlist if has_final_sort.
3192+ *
3193+ * We find a suitable pathkey expression (some earlier step
3194+ * should have verified that there is one) and deparse it.
3195 */
3196 static void
3197 appendOrderByClause(List *pathkeys, bool has_final_sort,
3198@@ -3200,8 +3249,7 @@ appendOrderByClause(List *pathkeys, bool has_final_sort,
3199 {
3200 ListCell *lcell;
3201 int nestlevel;
3202- char *delim = " ";
3203- RelOptInfo *baserel = context->scanrel;
3204+ const char *delim = " ";
3205 StringInfo buf = context->buf;
3206
3207 /* Make sure any constants in the exprs are printed portably */
3208@@ -3211,7 +3259,9 @@ appendOrderByClause(List *pathkeys, bool has_final_sort,
3209 foreach(lcell, pathkeys)
3210 {
3211 PathKey *pathkey = lfirst(lcell);
3212+ EquivalenceMember *em;
3213 Expr *em_expr;
3214+ Oid oprid;
3215
3216 if (has_final_sort)
3217 {
3218@@ -3219,26 +3269,48 @@ appendOrderByClause(List *pathkeys, bool has_final_sort,
3219 * By construction, context->foreignrel is the input relation to
3220 * the final sort.
3221 */
3222- em_expr = find_em_expr_for_input_target(context->root,
3223- pathkey->pk_eclass,
3224- context->foreignrel->reltarget);
3225+ em = find_em_for_rel_target(context->root,
3226+ pathkey->pk_eclass,
3227+ context->foreignrel);
3228 }
3229 else
3230- em_expr = find_em_expr_for_rel(pathkey->pk_eclass, baserel);
3231+ em = find_em_for_rel(context->root,
3232+ pathkey->pk_eclass,
3233+ context->scanrel);
3234+
3235+ /*
3236+ * We don't expect any error here; it would mean that shippability
3237+ * wasn't verified earlier. For the same reason, we don't recheck
3238+ * shippability of the sort operator.
3239+ */
3240+ if (em == NULL)
3241+ elog(ERROR, "could not find pathkey item to sort");
3242+
3243+ em_expr = em->em_expr;
3244
3245- Assert(em_expr != NULL);
3246+ /*
3247+ * Lookup the operator corresponding to the strategy in the opclass.
3248+ * The datatype used by the opfamily is not necessarily the same as
3249+ * the expression type (for array types for example).
3250+ */
3251+ oprid = get_opfamily_member(pathkey->pk_opfamily,
3252+ em->em_datatype,
3253+ em->em_datatype,
3254+ pathkey->pk_strategy);
3255+ if (!OidIsValid(oprid))
3256+ elog(ERROR, "missing operator %d(%u,%u) in opfamily %u",
3257+ pathkey->pk_strategy, em->em_datatype, em->em_datatype,
3258+ pathkey->pk_opfamily);
3259
3260 appendStringInfoString(buf, delim);
3261 deparseExpr(em_expr, context);
3262- if (pathkey->pk_strategy == BTLessStrategyNumber)
3263- appendStringInfoString(buf, " ASC");
3264- else
3265- appendStringInfoString(buf, " DESC");
3266
3267- if (pathkey->pk_nulls_first)
3268- appendStringInfoString(buf, " NULLS FIRST");
3269- else
3270- appendStringInfoString(buf, " NULLS LAST");
3271+ /*
3272+ * Here we need to use the expression's actual type to discover
3273+ * whether the desired operator will be the default or not.
3274+ */
3275+ appendOrderBySuffix(oprid, exprType((Node *) em_expr),
3276+ pathkey->pk_nulls_first, context);
3277
3278 delim = ", ";
3279 }
3280diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out
3281index a2d4cbb..a5c70d1 100644
3282--- a/contrib/postgres_fdw/expected/postgres_fdw.out
3283+++ b/contrib/postgres_fdw/expected/postgres_fdw.out
3284@@ -3160,6 +3160,19 @@ select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6
3285 Remote SQL: SELECT "C 1", c2 FROM "S 1"."T 1" WHERE (("C 1" < 100)) AND ((c2 = 6))
3286 (6 rows)
3287
3288+-- This should not be pushed either.
3289+explain (verbose, costs off)
3290+select * from ft2 order by c1 using operator(public.<^);
3291+ QUERY PLAN
3292+-------------------------------------------------------------------------------
3293+ Sort
3294+ Output: c1, c2, c3, c4, c5, c6, c7, c8
3295+ Sort Key: ft2.c1 USING <^
3296+ -> Foreign Scan on public.ft2
3297+ Output: c1, c2, c3, c4, c5, c6, c7, c8
3298+ Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8 FROM "S 1"."T 1"
3299+(6 rows)
3300+
3301 -- Update local stats on ft2
3302 ANALYZE ft2;
3303 -- Add into extension
3304@@ -3187,6 +3200,16 @@ select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6
3305 {6,16,26,36,46,56,66,76,86,96}
3306 (1 row)
3307
3308+-- This should be pushed too.
3309+explain (verbose, costs off)
3310+select * from ft2 order by c1 using operator(public.<^);
3311+ QUERY PLAN
3312+-----------------------------------------------------------------------------------------------------------------------------
3313+ Foreign Scan on public.ft2
3314+ Output: c1, c2, c3, c4, c5, c6, c7, c8
3315+ Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8 FROM "S 1"."T 1" ORDER BY "C 1" USING OPERATOR(public.<^) NULLS LAST
3316+(3 rows)
3317+
3318 -- Remove from extension
3319 alter extension postgres_fdw drop operator class my_op_class using btree;
3320 alter extension postgres_fdw drop function my_op_cmp(a int, b int);
3321diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
3322index 74dcaf6..3dc717c 100644
3323--- a/contrib/postgres_fdw/postgres_fdw.c
3324+++ b/contrib/postgres_fdw/postgres_fdw.c
3325@@ -18,6 +18,7 @@
3326 #include "access/sysattr.h"
3327 #include "access/table.h"
3328 #include "catalog/pg_class.h"
3329+#include "catalog/pg_opfamily.h"
3330 #include "commands/defrem.h"
3331 #include "commands/explain.h"
3332 #include "commands/vacuum.h"
3333@@ -866,8 +867,6 @@ get_useful_pathkeys_for_relation(PlannerInfo *root, RelOptInfo *rel)
3334 foreach(lc, root->query_pathkeys)
3335 {
3336 PathKey *pathkey = (PathKey *) lfirst(lc);
3337- EquivalenceClass *pathkey_ec = pathkey->pk_eclass;
3338- Expr *em_expr;
3339
3340 /*
3341 * The planner and executor don't have any clever strategy for
3342@@ -875,13 +874,8 @@ get_useful_pathkeys_for_relation(PlannerInfo *root, RelOptInfo *rel)
3343 * getting it to be sorted by all of those pathkeys. We'll just
3344 * end up resorting the entire data set. So, unless we can push
3345 * down all of the query pathkeys, forget it.
3346- *
3347- * is_foreign_expr would detect volatile expressions as well, but
3348- * checking ec_has_volatile here saves some cycles.
3349 */
3350- if (pathkey_ec->ec_has_volatile ||
3351- !(em_expr = find_em_expr_for_rel(pathkey_ec, rel)) ||
3352- !is_foreign_expr(root, rel, em_expr))
3353+ if (!is_foreign_pathkey(root, rel, pathkey))
3354 {
3355 query_pathkeys_ok = false;
3356 break;
3357@@ -928,16 +922,19 @@ get_useful_pathkeys_for_relation(PlannerInfo *root, RelOptInfo *rel)
3358 foreach(lc, useful_eclass_list)
3359 {
3360 EquivalenceClass *cur_ec = lfirst(lc);
3361- Expr *em_expr;
3362 PathKey *pathkey;
3363
3364 /* If redundant with what we did above, skip it. */
3365 if (cur_ec == query_ec)
3366 continue;
3367
3368+ /* Can't push down the sort if the EC's opfamily is not shippable. */
3369+ if (!is_shippable(linitial_oid(cur_ec->ec_opfamilies),
3370+ OperatorFamilyRelationId, fpinfo))
3371+ continue;
3372+
3373 /* If no pushable expression for this rel, skip it. */
3374- em_expr = find_em_expr_for_rel(cur_ec, rel);
3375- if (em_expr == NULL || !is_foreign_expr(root, rel, em_expr))
3376+ if (find_em_for_rel(root, cur_ec, rel) == NULL)
3377 continue;
3378
3379 /* Looks like we can generate a pathkey, so let's do it. */
3380@@ -6053,7 +6050,6 @@ add_foreign_ordered_paths(PlannerInfo *root, RelOptInfo *input_rel,
3381 {
3382 PathKey *pathkey = (PathKey *) lfirst(lc);
3383 EquivalenceClass *pathkey_ec = pathkey->pk_eclass;
3384- Expr *sort_expr;
3385
3386 /*
3387 * is_foreign_expr would detect volatile expressions as well, but
3388@@ -6062,13 +6058,20 @@ add_foreign_ordered_paths(PlannerInfo *root, RelOptInfo *input_rel,
3389 if (pathkey_ec->ec_has_volatile)
3390 return;
3391
3392- /* Get the sort expression for the pathkey_ec */
3393- sort_expr = find_em_expr_for_input_target(root,
3394- pathkey_ec,
3395- input_rel->reltarget);
3396+ /*
3397+ * Can't push down the sort if pathkey's opfamily is not shippable.
3398+ */
3399+ if (!is_shippable(pathkey->pk_opfamily, OperatorFamilyRelationId,
3400+ fpinfo))
3401+ return;
3402
3403- /* If it's unsafe to remote, we cannot push down the final sort */
3404- if (!is_foreign_expr(root, input_rel, sort_expr))
3405+ /*
3406+ * The EC must contain a shippable EM that is computed in input_rel's
3407+ * reltarget, else we can't push down the sort.
3408+ */
3409+ if (find_em_for_rel_target(root,
3410+ pathkey_ec,
3411+ input_rel) == NULL)
3412 return;
3413 }
3414
3415@@ -6602,14 +6605,55 @@ conversion_error_callback(void *arg)
3416 }
3417
3418 /*
3419- * Find an equivalence class member expression to be computed as a sort column
3420- * in the given target.
3421+ * Given an EquivalenceClass and a foreign relation, find an EC member
3422+ * that can be used to sort the relation remotely according to a pathkey
3423+ * using this EC.
3424+ *
3425+ * If there is more than one suitable candidate, return an arbitrary
3426+ * one of them. If there is none, return NULL.
3427+ *
3428+ * This checks that the EC member expression uses only Vars from the given
3429+ * rel and is shippable. Caller must separately verify that the pathkey's
3430+ * ordering operator is shippable.
3431+ */
3432+EquivalenceMember *
3433+find_em_for_rel(PlannerInfo *root, EquivalenceClass *ec, RelOptInfo *rel)
3434+{
3435+ ListCell *lc;
3436+
3437+ foreach(lc, ec->ec_members)
3438+ {
3439+ EquivalenceMember *em = (EquivalenceMember *) lfirst(lc);
3440+
3441+ /*
3442+ * Note we require !bms_is_empty, else we'd accept constant
3443+ * expressions which are not suitable for the purpose.
3444+ */
3445+ if (bms_is_subset(em->em_relids, rel->relids) &&
3446+ !bms_is_empty(em->em_relids) &&
3447+ is_foreign_expr(root, rel, em->em_expr))
3448+ return em;
3449+ }
3450+
3451+ return NULL;
3452+}
3453+
3454+/*
3455+ * Find an EquivalenceClass member that is to be computed as a sort column
3456+ * in the given rel's reltarget, and is shippable.
3457+ *
3458+ * If there is more than one suitable candidate, return an arbitrary
3459+ * one of them. If there is none, return NULL.
3460+ *
3461+ * This checks that the EC member expression uses only Vars from the given
3462+ * rel and is shippable. Caller must separately verify that the pathkey's
3463+ * ordering operator is shippable.
3464 */
3465-Expr *
3466-find_em_expr_for_input_target(PlannerInfo *root,
3467- EquivalenceClass *ec,
3468- PathTarget *target)
3469+EquivalenceMember *
3470+find_em_for_rel_target(PlannerInfo *root, EquivalenceClass *ec,
3471+ RelOptInfo *rel)
3472 {
3473+ PathTarget *target = rel->reltarget;
3474 ListCell *lc1;
3475 int i;
3476
3477@@ -6652,13 +6696,16 @@ find_em_expr_for_input_target(PlannerInfo *root,
3478 while (em_expr && IsA(em_expr, RelabelType))
3479 em_expr = ((RelabelType *) em_expr)->arg;
3480
3481- if (equal(em_expr, expr))
3482- return em->em_expr;
3483+ if (!equal(em_expr, expr))
3484+ continue;
3485+
3486+ /* Check that expression (including relabels!) is shippable */
3487+ if (is_foreign_expr(root, rel, em->em_expr))
3488+ return em;
3489 }
3490
3491 i++;
3492 }
3493
3494- elog(ERROR, "could not find pathkey item to sort");
3495- return NULL; /* keep compiler quiet */
3496+ return NULL;
3497 }
3498diff --git a/contrib/postgres_fdw/postgres_fdw.h b/contrib/postgres_fdw/postgres_fdw.h
3499index eef410d..1fcc72f 100644
3500--- a/contrib/postgres_fdw/postgres_fdw.h
3501+++ b/contrib/postgres_fdw/postgres_fdw.h
3502@@ -157,6 +157,9 @@ extern bool is_foreign_expr(PlannerInfo *root,
3503 extern bool is_foreign_param(PlannerInfo *root,
3504 RelOptInfo *baserel,
3505 Expr *expr);
3506+extern bool is_foreign_pathkey(PlannerInfo *root,
3507+ RelOptInfo *baserel,
3508+ PathKey *pathkey);
3509 extern void deparseInsertSql(StringInfo buf, RangeTblEntry *rte,
3510 Index rtindex, Relation rel,
3511 List *targetAttrs, bool doNothing,
3512@@ -191,10 +194,12 @@ extern void deparseAnalyzeSizeSql(StringInfo buf, Relation rel);
3513 extern void deparseAnalyzeSql(StringInfo buf, Relation rel,
3514 List **retrieved_attrs);
3515 extern void deparseStringLiteral(StringInfo buf, const char *val);
3516-extern Expr *find_em_expr_for_rel(EquivalenceClass *ec, RelOptInfo *rel);
3517-extern Expr *find_em_expr_for_input_target(PlannerInfo *root,
3518- EquivalenceClass *ec,
3519- PathTarget *target);
3520+extern EquivalenceMember *find_em_for_rel(PlannerInfo *root,
3521+ EquivalenceClass *ec,
3522+ RelOptInfo *rel);
3523+extern EquivalenceMember *find_em_for_rel_target(PlannerInfo *root,
3524+ EquivalenceClass *ec,
3525+ RelOptInfo *rel);
3526 extern List *build_tlist_to_deparse(RelOptInfo *foreignrel);
3527 extern void deparseSelectStmtForRel(StringInfo buf, PlannerInfo *root,
3528 RelOptInfo *foreignrel, List *tlist,
3529diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql
3530index 73163fe..808ce6f 100644
3531--- a/contrib/postgres_fdw/sql/postgres_fdw.sql
3532+++ b/contrib/postgres_fdw/sql/postgres_fdw.sql
3533@@ -861,6 +861,10 @@ create operator class my_op_class for type int using btree family my_op_family a
3534 explain (verbose, costs off)
3535 select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2;
3536
3537+-- This should not be pushed either.
3538+explain (verbose, costs off)
3539+select * from ft2 order by c1 using operator(public.<^);
3540+
3541 -- Update local stats on ft2
3542 ANALYZE ft2;
3543
3544@@ -878,6 +882,10 @@ explain (verbose, costs off)
3545 select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2;
3546 select array_agg(c1 order by c1 using operator(public.<^)) from ft2 where c2 = 6 and c1 < 100 group by c2;
3547
3548+-- This should be pushed too.
3549+explain (verbose, costs off)
3550+select * from ft2 order by c1 using operator(public.<^);
3551+
3552 -- Remove from extension
3553 alter extension postgres_fdw drop operator class my_op_class using btree;
3554 alter extension postgres_fdw drop function my_op_cmp(a int, b int);
3555diff --git a/contrib/seg/segparse.c b/contrib/seg/segparse.c
3556index b5bcb70..ec32a58 100644
3557--- a/contrib/seg/segparse.c
3558+++ b/contrib/seg/segparse.c
3559@@ -1,8 +1,8 @@
3560-/* A Bison parser, made by GNU Bison 3.3.2. */
3561+/* A Bison parser, made by GNU Bison 3.7.5. */
3562
3563 /* Bison implementation for Yacc-like parsers in C
3564
3565- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
3566+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
3567 Inc.
3568
3569 This program is free software: you can redistribute it and/or modify
3570@@ -34,6 +34,10 @@
3571 /* C LALR(1) parser skeleton written by Richard Stallman, by
3572 simplifying the original so-called "semantic" parser. */
3573
3574+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
3575+ especially those whose name start with YY_ or yy_. They are
3576+ private implementation details that can be changed or removed. */
3577+
3578 /* All symbols defined below should begin with yy or YY, to avoid
3579 infringing on user name space. This should be done even for local
3580 variables, as they might otherwise be expanded by user macros.
3581@@ -41,14 +45,11 @@
3582 define necessary library symbols; they are noted "INFRINGES ON
3583 USER NAME SPACE" below. */
3584
3585-/* Undocumented macros, especially those whose name start with YY_,
3586- are private implementation details. Do not rely on them. */
3587-
3588-/* Identify Bison output. */
3589-#define YYBISON 1
3590+/* Identify Bison output, and Bison version. */
3591+#define YYBISON 30705
3592
3593-/* Bison version. */
3594-#define YYBISON_VERSION "3.3.2"
3595+/* Bison version string. */
3596+#define YYBISON_VERSION "3.7.5"
3597
3598 /* Skeleton name. */
3599 #define YYSKELETON_NAME "yacc.c"
3600@@ -69,12 +70,11 @@
3601 #define yyerror seg_yyerror
3602 #define yydebug seg_yydebug
3603 #define yynerrs seg_yynerrs
3604-
3605 #define yylval seg_yylval
3606 #define yychar seg_yychar
3607
3608 /* First part of user prologue. */
3609-#line 1 "segparse.y" /* yacc.c:337 */
3610+#line 1 "segparse.y"
3611
3612 /* contrib/seg/segparse.y */
3613
3614@@ -109,7 +109,17 @@ static char strbuf[25] = {
3615 };
3616
3617
3618-#line 113 "segparse.c" /* yacc.c:337 */
3619+#line 113 "segparse.c"
3620+
3621+# ifndef YY_CAST
3622+# ifdef __cplusplus
3623+# define YY_CAST(Type, Val) static_cast<Type> (Val)
3624+# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
3625+# else
3626+# define YY_CAST(Type, Val) ((Type) (Val))
3627+# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
3628+# endif
3629+# endif
3630 # ifndef YY_NULLPTR
3631 # if defined __cplusplus
3632 # if 201103L <= __cplusplus
3633@@ -122,14 +132,6 @@ static char strbuf[25] = {
3634 # endif
3635 # endif
3636
3637-/* Enabling verbose error messages. */
3638-#ifdef YYERROR_VERBOSE
3639-# undef YYERROR_VERBOSE
3640-# define YYERROR_VERBOSE 1
3641-#else
3642-# define YYERROR_VERBOSE 0
3643-#endif
3644-
3645
3646 /* Debug traces. */
3647 #ifndef YYDEBUG
3648@@ -139,24 +141,28 @@ static char strbuf[25] = {
3649 extern int seg_yydebug;
3650 #endif
3651
3652-/* Token type. */
3653+/* Token kinds. */
3654 #ifndef YYTOKENTYPE
3655 # define YYTOKENTYPE
3656 enum yytokentype
3657 {
3658- SEGFLOAT = 258,
3659- RANGE = 259,
3660- PLUMIN = 260,
3661- EXTENSION = 261
3662+ YYEMPTY = -2,
3663+ YYEOF = 0, /* "end of file" */
3664+ YYerror = 256, /* error */
3665+ YYUNDEF = 257, /* "invalid token" */
3666+ SEGFLOAT = 258, /* SEGFLOAT */
3667+ RANGE = 259, /* RANGE */
3668+ PLUMIN = 260, /* PLUMIN */
3669+ EXTENSION = 261 /* EXTENSION */
3670 };
3671+ typedef enum yytokentype yytoken_kind_t;
3672 #endif
3673
3674 /* Value type. */
3675 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
3676-
3677 union YYSTYPE
3678 {
3679-#line 41 "segparse.y" /* yacc.c:352 */
3680+#line 41 "segparse.y"
3681
3682 struct BND {
3683 float val;
3684@@ -165,9 +171,9 @@ union YYSTYPE
3685 } bnd;
3686 char * text;
3687
3688-#line 169 "segparse.c" /* yacc.c:352 */
3689-};
3690+#line 175 "segparse.c"
3691
3692+};
3693 typedef union YYSTYPE YYSTYPE;
3694 # define YYSTYPE_IS_TRIVIAL 1
3695 # define YYSTYPE_IS_DECLARED 1
3696@@ -179,6 +185,24 @@ extern YYSTYPE seg_yylval;
3697 int seg_yyparse (SEG *result);
3698
3699
3700+/* Symbol kind. */
3701+enum yysymbol_kind_t
3702+{
3703+ YYSYMBOL_YYEMPTY = -2,
3704+ YYSYMBOL_YYEOF = 0, /* "end of file" */
3705+ YYSYMBOL_YYerror = 1, /* error */
3706+ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
3707+ YYSYMBOL_SEGFLOAT = 3, /* SEGFLOAT */
3708+ YYSYMBOL_RANGE = 4, /* RANGE */
3709+ YYSYMBOL_PLUMIN = 5, /* PLUMIN */
3710+ YYSYMBOL_EXTENSION = 6, /* EXTENSION */
3711+ YYSYMBOL_YYACCEPT = 7, /* $accept */
3712+ YYSYMBOL_range = 8, /* range */
3713+ YYSYMBOL_boundary = 9, /* boundary */
3714+ YYSYMBOL_deviation = 10 /* deviation */
3715+};
3716+typedef enum yysymbol_kind_t yysymbol_kind_t;
3717+
3718
3719
3720
3721@@ -186,28 +210,87 @@ int seg_yyparse (SEG *result);
3722 # undef short
3723 #endif
3724
3725-#ifdef YYTYPE_UINT8
3726-typedef YYTYPE_UINT8 yytype_uint8;
3727-#else
3728-typedef unsigned char yytype_uint8;
3729+/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3730+ <limits.h> and (if available) <stdint.h> are included
3731+ so that the code can choose integer types of a good width. */
3732+
3733+#ifndef __PTRDIFF_MAX__
3734+# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3735+# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3736+# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3737+# define YY_STDINT_H
3738+# endif
3739 #endif
3740
3741-#ifdef YYTYPE_INT8
3742-typedef YYTYPE_INT8 yytype_int8;
3743+/* Narrow types that promote to a signed type and that can represent a
3744+ signed or unsigned integer of at least N bits. In tables they can
3745+ save space and decrease cache pressure. Promoting to a signed type
3746+ helps avoid bugs in integer arithmetic. */
3747+
3748+#ifdef __INT_LEAST8_MAX__
3749+typedef __INT_LEAST8_TYPE__ yytype_int8;
3750+#elif defined YY_STDINT_H
3751+typedef int_least8_t yytype_int8;
3752 #else
3753 typedef signed char yytype_int8;
3754 #endif
3755
3756-#ifdef YYTYPE_UINT16
3757-typedef YYTYPE_UINT16 yytype_uint16;
3758+#ifdef __INT_LEAST16_MAX__
3759+typedef __INT_LEAST16_TYPE__ yytype_int16;
3760+#elif defined YY_STDINT_H
3761+typedef int_least16_t yytype_int16;
3762 #else
3763-typedef unsigned short yytype_uint16;
3764+typedef short yytype_int16;
3765+#endif
3766+
3767+/* Work around bug in HP-UX 11.23, which defines these macros
3768+ incorrectly for preprocessor constants. This workaround can likely
3769+ be removed in 2023, as HPE has promised support for HP-UX 11.23
3770+ (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3771+ <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3772+#ifdef __hpux
3773+# undef UINT_LEAST8_MAX
3774+# undef UINT_LEAST16_MAX
3775+# define UINT_LEAST8_MAX 255
3776+# define UINT_LEAST16_MAX 65535
3777+#endif
3778+
3779+#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3780+typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3781+#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3782+ && UINT_LEAST8_MAX <= INT_MAX)
3783+typedef uint_least8_t yytype_uint8;
3784+#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3785+typedef unsigned char yytype_uint8;
3786+#else
3787+typedef short yytype_uint8;
3788 #endif
3789
3790-#ifdef YYTYPE_INT16
3791-typedef YYTYPE_INT16 yytype_int16;
3792+#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3793+typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3794+#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3795+ && UINT_LEAST16_MAX <= INT_MAX)
3796+typedef uint_least16_t yytype_uint16;
3797+#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3798+typedef unsigned short yytype_uint16;
3799 #else
3800-typedef short yytype_int16;
3801+typedef int yytype_uint16;
3802+#endif
3803+
3804+#ifndef YYPTRDIFF_T
3805+# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3806+# define YYPTRDIFF_T __PTRDIFF_TYPE__
3807+# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3808+# elif defined PTRDIFF_MAX
3809+# ifndef ptrdiff_t
3810+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3811+# endif
3812+# define YYPTRDIFF_T ptrdiff_t
3813+# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3814+# else
3815+# define YYPTRDIFF_T long
3816+# define YYPTRDIFF_MAXIMUM LONG_MAX
3817+# endif
3818 #endif
3819
3820 #ifndef YYSIZE_T
3821@@ -215,7 +298,7 @@ typedef short yytype_int16;
3822 # define YYSIZE_T __SIZE_TYPE__
3823 # elif defined size_t
3824 # define YYSIZE_T size_t
3825-# elif ! defined YYSIZE_T
3826+# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3827 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3828 # define YYSIZE_T size_t
3829 # else
3830@@ -223,7 +306,20 @@ typedef short yytype_int16;
3831 # endif
3832 #endif
3833
3834-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
3835+#define YYSIZE_MAXIMUM \
3836+ YY_CAST (YYPTRDIFF_T, \
3837+ (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3838+ ? YYPTRDIFF_MAXIMUM \
3839+ : YY_CAST (YYSIZE_T, -1)))
3840+
3841+#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3842+
3843+
3844+/* Stored state numbers (used for stacks). */
3845+typedef yytype_int8 yy_state_t;
3846+
3847+/* State numbers in computations. */
3848+typedef int yy_state_fast_t;
3849
3850 #ifndef YY_
3851 # if defined YYENABLE_NLS && YYENABLE_NLS
3852@@ -237,38 +333,37 @@ typedef short yytype_int16;
3853 # endif
3854 #endif
3855
3856-#ifndef YY_ATTRIBUTE
3857-# if (defined __GNUC__ \
3858- && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
3859- || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
3860-# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
3861-# else
3862-# define YY_ATTRIBUTE(Spec) /* empty */
3863-# endif
3864-#endif
3865
3866 #ifndef YY_ATTRIBUTE_PURE
3867-# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
3868+# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3869+# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3870+# else
3871+# define YY_ATTRIBUTE_PURE
3872+# endif
3873 #endif
3874
3875 #ifndef YY_ATTRIBUTE_UNUSED
3876-# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
3877+# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3878+# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3879+# else
3880+# define YY_ATTRIBUTE_UNUSED
3881+# endif
3882 #endif
3883
3884 /* Suppress unused-variable warnings by "using" E. */
3885 #if ! defined lint || defined __GNUC__
3886-# define YYUSE(E) ((void) (E))
3887+# define YY_USE(E) ((void) (E))
3888 #else
3889-# define YYUSE(E) /* empty */
3890+# define YY_USE(E) /* empty */
3891 #endif
3892
3893 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
3894 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
3895-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3896- _Pragma ("GCC diagnostic push") \
3897- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
3898+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3899+ _Pragma ("GCC diagnostic push") \
3900+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3901 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3902-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3903+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3904 _Pragma ("GCC diagnostic pop")
3905 #else
3906 # define YY_INITIAL_VALUE(Value) Value
3907@@ -281,8 +376,22 @@ typedef short yytype_int16;
3908 # define YY_INITIAL_VALUE(Value) /* Nothing. */
3909 #endif
3910
3911+#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3912+# define YY_IGNORE_USELESS_CAST_BEGIN \
3913+ _Pragma ("GCC diagnostic push") \
3914+ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3915+# define YY_IGNORE_USELESS_CAST_END \
3916+ _Pragma ("GCC diagnostic pop")
3917+#endif
3918+#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3919+# define YY_IGNORE_USELESS_CAST_BEGIN
3920+# define YY_IGNORE_USELESS_CAST_END
3921+#endif
3922+
3923+
3924+#define YY_ASSERT(E) ((void) (0 && (E)))
3925
3926-#if ! defined yyoverflow || YYERROR_VERBOSE
3927+#if !defined yyoverflow
3928
3929 /* The parser invokes alloca or malloc; define the necessary symbols. */
3930
3931@@ -347,8 +456,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
3932 # endif
3933 # endif
3934 # endif
3935-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
3936-
3937+#endif /* !defined yyoverflow */
3938
3939 #if (! defined yyoverflow \
3940 && (! defined __cplusplus \
3941@@ -357,17 +465,17 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
3942 /* A type that is properly aligned for any stack member. */
3943 union yyalloc
3944 {
3945- yytype_int16 yyss_alloc;
3946+ yy_state_t yyss_alloc;
3947 YYSTYPE yyvs_alloc;
3948 };
3949
3950 /* The size of the maximum gap between one aligned stack and the next. */
3951-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
3952+# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3953
3954 /* The size of an array large to enough to hold all stacks, each with
3955 N elements. */
3956 # define YYSTACK_BYTES(N) \
3957- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
3958+ ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
3959 + YYSTACK_GAP_MAXIMUM)
3960
3961 # define YYCOPY_NEEDED 1
3962@@ -380,11 +488,11 @@ union yyalloc
3963 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3964 do \
3965 { \
3966- YYSIZE_T yynewbytes; \
3967+ YYPTRDIFF_T yynewbytes; \
3968 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3969 Stack = &yyptr->Stack_alloc; \
3970- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
3971- yyptr += yynewbytes / sizeof (*yyptr); \
3972+ yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3973+ yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3974 } \
3975 while (0)
3976
3977@@ -396,12 +504,12 @@ union yyalloc
3978 # ifndef YYCOPY
3979 # if defined __GNUC__ && 1 < __GNUC__
3980 # define YYCOPY(Dst, Src, Count) \
3981- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
3982+ __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3983 # else
3984 # define YYCOPY(Dst, Src, Count) \
3985 do \
3986 { \
3987- YYSIZE_T yyi; \
3988+ YYPTRDIFF_T yyi; \
3989 for (yyi = 0; yyi < (Count); yyi++) \
3990 (Dst)[yyi] = (Src)[yyi]; \
3991 } \
3992@@ -424,17 +532,20 @@ union yyalloc
3993 /* YYNSTATES -- Number of states. */
3994 #define YYNSTATES 14
3995
3996-#define YYUNDEFTOK 2
3997+/* YYMAXUTOK -- Last valid token kind. */
3998 #define YYMAXUTOK 261
3999
4000+
4001 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
4002 as returned by yylex, with out-of-bounds checking. */
4003-#define YYTRANSLATE(YYX) \
4004- ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
4005+#define YYTRANSLATE(YYX) \
4006+ (0 <= (YYX) && (YYX) <= YYMAXUTOK \
4007+ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
4008+ : YYSYMBOL_YYUNDEF)
4009
4010 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
4011 as returned by yylex. */
4012-static const yytype_uint8 yytranslate[] =
4013+static const yytype_int8 yytranslate[] =
4014 {
4015 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
4016 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
4017@@ -473,33 +584,46 @@ static const yytype_uint8 yyrline[] =
4018 };
4019 #endif
4020
4021-#if YYDEBUG || YYERROR_VERBOSE || 0
4022+/** Accessing symbol of state STATE. */
4023+#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
4024+
4025+#if YYDEBUG || 0
4026+/* The user-facing name of the symbol whose (internal) number is
4027+ YYSYMBOL. No bounds checking. */
4028+static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
4029+
4030 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
4031 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
4032 static const char *const yytname[] =
4033 {
4034- "$end", "error", "$undefined", "SEGFLOAT", "RANGE", "PLUMIN",
4035- "EXTENSION", "$accept", "range", "boundary", "deviation", YY_NULLPTR
4036+ "\"end of file\"", "error", "\"invalid token\"", "SEGFLOAT", "RANGE",
4037+ "PLUMIN", "EXTENSION", "$accept", "range", "boundary", "deviation", YY_NULLPTR
4038 };
4039+
4040+static const char *
4041+yysymbol_name (yysymbol_kind_t yysymbol)
4042+{
4043+ return yytname[yysymbol];
4044+}
4045 #endif
4046
4047-# ifdef YYPRINT
4048+#ifdef YYPRINT
4049 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
4050 (internal) symbol number NUM (which must be that of a token). */
4051-static const yytype_uint16 yytoknum[] =
4052+static const yytype_int16 yytoknum[] =
4053 {
4054 0, 256, 257, 258, 259, 260, 261
4055 };
4056-# endif
4057+#endif
4058
4059-#define YYPACT_NINF -3
4060+#define YYPACT_NINF (-3)
4061
4062-#define yypact_value_is_default(Yystate) \
4063- (!!((Yystate) == (-3)))
4064+#define yypact_value_is_default(Yyn) \
4065+ ((Yyn) == YYPACT_NINF)
4066
4067-#define YYTABLE_NINF -1
4068+#define YYTABLE_NINF (-1)
4069
4070-#define yytable_value_is_error(Yytable_value) \
4071+#define yytable_value_is_error(Yyn) \
4072 0
4073
4074 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
4075@@ -513,7 +637,7 @@ static const yytype_int8 yypact[] =
4076 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
4077 Performed when YYTABLE does not specify something else to do. Zero
4078 means the default is an error. */
4079-static const yytype_uint8 yydefact[] =
4080+static const yytype_int8 yydefact[] =
4081 {
4082 0, 7, 0, 0, 0, 6, 5, 8, 1, 4,
4083 0, 3, 9, 2
4084@@ -528,13 +652,13 @@ static const yytype_int8 yypgoto[] =
4085 /* YYDEFGOTO[NTERM-NUM]. */
4086 static const yytype_int8 yydefgoto[] =
4087 {
4088- -1, 4, 5, 13
4089+ 0, 4, 5, 13
4090 };
4091
4092 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4093 positive, shift that token. If negative, reduce the rule whose
4094 number is the opposite. If YYTABLE_NINF, syntax error. */
4095-static const yytype_uint8 yytable[] =
4096+static const yytype_int8 yytable[] =
4097 {
4098 6, 0, 1, 2, 7, 3, 1, 11, 8, 3,
4099 9, 10, 12
4100@@ -548,29 +672,29 @@ static const yytype_int8 yycheck[] =
4101
4102 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
4103 symbol of state STATE-NUM. */
4104-static const yytype_uint8 yystos[] =
4105+static const yytype_int8 yystos[] =
4106 {
4107 0, 3, 4, 6, 8, 9, 9, 3, 0, 4,
4108 5, 9, 3, 10
4109 };
4110
4111 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
4112-static const yytype_uint8 yyr1[] =
4113+static const yytype_int8 yyr1[] =
4114 {
4115 0, 7, 8, 8, 8, 8, 8, 9, 9, 10
4116 };
4117
4118 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
4119-static const yytype_uint8 yyr2[] =
4120+static const yytype_int8 yyr2[] =
4121 {
4122 0, 2, 3, 3, 2, 2, 1, 1, 2, 1
4123 };
4124
4125
4126+enum { YYENOMEM = -2 };
4127+
4128 #define yyerrok (yyerrstatus = 0)
4129 #define yyclearin (yychar = YYEMPTY)
4130-#define YYEMPTY (-2)
4131-#define YYEOF 0
4132
4133 #define YYACCEPT goto yyacceptlab
4134 #define YYABORT goto yyabortlab
4135@@ -596,10 +720,9 @@ static const yytype_uint8 yyr2[] =
4136 } \
4137 while (0)
4138
4139-/* Error token number */
4140-#define YYTERROR 1
4141-#define YYERRCODE 256
4142-
4143+/* Backward compatibility with an undocumented macro.
4144+ Use YYerror or YYUNDEF. */
4145+#define YYERRCODE YYUNDEF
4146
4147
4148 /* Enable debugging if requested. */
4149@@ -617,18 +740,18 @@ do { \
4150 } while (0)
4151
4152 /* This macro is provided for backward compatibility. */
4153-#ifndef YY_LOCATION_PRINT
4154-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
4155-#endif
4156+# ifndef YY_LOCATION_PRINT
4157+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
4158+# endif
4159
4160
4161-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
4162+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
4163 do { \
4164 if (yydebug) \
4165 { \
4166 YYFPRINTF (stderr, "%s ", Title); \
4167 yy_symbol_print (stderr, \
4168- Type, Value, result); \
4169+ Kind, Value, result); \
4170 YYFPRINTF (stderr, "\n"); \
4171 } \
4172 } while (0)
4173@@ -639,18 +762,21 @@ do { \
4174 `-----------------------------------*/
4175
4176 static void
4177-yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, SEG *result)
4178+yy_symbol_value_print (FILE *yyo,
4179+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, SEG *result)
4180 {
4181 FILE *yyoutput = yyo;
4182- YYUSE (yyoutput);
4183- YYUSE (result);
4184+ YY_USE (yyoutput);
4185+ YY_USE (result);
4186 if (!yyvaluep)
4187 return;
4188 # ifdef YYPRINT
4189- if (yytype < YYNTOKENS)
4190- YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
4191+ if (yykind < YYNTOKENS)
4192+ YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
4193 # endif
4194- YYUSE (yytype);
4195+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
4196+ YY_USE (yykind);
4197+ YY_IGNORE_MAYBE_UNINITIALIZED_END
4198 }
4199
4200
4201@@ -659,12 +785,13 @@ yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, SE
4202 `---------------------------*/
4203
4204 static void
4205-yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, SEG *result)
4206+yy_symbol_print (FILE *yyo,
4207+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, SEG *result)
4208 {
4209 YYFPRINTF (yyo, "%s %s (",
4210- yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
4211+ yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
4212
4213- yy_symbol_value_print (yyo, yytype, yyvaluep, result);
4214+ yy_symbol_value_print (yyo, yykind, yyvaluep, result);
4215 YYFPRINTF (yyo, ")");
4216 }
4217
4218@@ -674,7 +801,7 @@ yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, SEG *res
4219 `------------------------------------------------------------------*/
4220
4221 static void
4222-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
4223+yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
4224 {
4225 YYFPRINTF (stderr, "Stack now");
4226 for (; yybottom <= yytop; yybottom++)
4227@@ -697,21 +824,21 @@ do { \
4228 `------------------------------------------------*/
4229
4230 static void
4231-yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, SEG *result)
4232+yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
4233+ int yyrule, SEG *result)
4234 {
4235- unsigned long yylno = yyrline[yyrule];
4236+ int yylno = yyrline[yyrule];
4237 int yynrhs = yyr2[yyrule];
4238 int yyi;
4239- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
4240+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
4241 yyrule - 1, yylno);
4242 /* The symbols being reduced. */
4243 for (yyi = 0; yyi < yynrhs; yyi++)
4244 {
4245 YYFPRINTF (stderr, " $%d = ", yyi + 1);
4246 yy_symbol_print (stderr,
4247- yystos[yyssp[yyi + 1 - yynrhs]],
4248- &yyvsp[(yyi + 1) - (yynrhs)]
4249- , result);
4250+ YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
4251+ &yyvsp[(yyi + 1) - (yynrhs)], result);
4252 YYFPRINTF (stderr, "\n");
4253 }
4254 }
4255@@ -726,8 +853,8 @@ do { \
4256 multiple parsers can coexist. */
4257 int yydebug;
4258 #else /* !YYDEBUG */
4259-# define YYDPRINTF(Args)
4260-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
4261+# define YYDPRINTF(Args) ((void) 0)
4262+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
4263 # define YY_STACK_PRINT(Bottom, Top)
4264 # define YY_REDUCE_PRINT(Rule)
4265 #endif /* !YYDEBUG */
4266@@ -750,255 +877,31 @@ int yydebug;
4267 #endif
4268
4269
4270-#if YYERROR_VERBOSE
4271-
4272-# ifndef yystrlen
4273-# if defined __GLIBC__ && defined _STRING_H
4274-# define yystrlen strlen
4275-# else
4276-/* Return the length of YYSTR. */
4277-static YYSIZE_T
4278-yystrlen (const char *yystr)
4279-{
4280- YYSIZE_T yylen;
4281- for (yylen = 0; yystr[yylen]; yylen++)
4282- continue;
4283- return yylen;
4284-}
4285-# endif
4286-# endif
4287-
4288-# ifndef yystpcpy
4289-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
4290-# define yystpcpy stpcpy
4291-# else
4292-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
4293- YYDEST. */
4294-static char *
4295-yystpcpy (char *yydest, const char *yysrc)
4296-{
4297- char *yyd = yydest;
4298- const char *yys = yysrc;
4299-
4300- while ((*yyd++ = *yys++) != '\0')
4301- continue;
4302-
4303- return yyd - 1;
4304-}
4305-# endif
4306-# endif
4307-
4308-# ifndef yytnamerr
4309-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
4310- quotes and backslashes, so that it's suitable for yyerror. The
4311- heuristic is that double-quoting is unnecessary unless the string
4312- contains an apostrophe, a comma, or backslash (other than
4313- backslash-backslash). YYSTR is taken from yytname. If YYRES is
4314- null, do not copy; instead, return the length of what the result
4315- would have been. */
4316-static YYSIZE_T
4317-yytnamerr (char *yyres, const char *yystr)
4318-{
4319- if (*yystr == '"')
4320- {
4321- YYSIZE_T yyn = 0;
4322- char const *yyp = yystr;
4323-
4324- for (;;)
4325- switch (*++yyp)
4326- {
4327- case '\'':
4328- case ',':
4329- goto do_not_strip_quotes;
4330-
4331- case '\\':
4332- if (*++yyp != '\\')
4333- goto do_not_strip_quotes;
4334- else
4335- goto append;
4336-
4337- append:
4338- default:
4339- if (yyres)
4340- yyres[yyn] = *yyp;
4341- yyn++;
4342- break;
4343-
4344- case '"':
4345- if (yyres)
4346- yyres[yyn] = '\0';
4347- return yyn;
4348- }
4349- do_not_strip_quotes: ;
4350- }
4351-
4352- if (! yyres)
4353- return yystrlen (yystr);
4354
4355- return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
4356-}
4357-# endif
4358
4359-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
4360- about the unexpected token YYTOKEN for the state stack whose top is
4361- YYSSP.
4362-
4363- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
4364- not large enough to hold the message. In that case, also set
4365- *YYMSG_ALLOC to the required number of bytes. Return 2 if the
4366- required number of bytes is too large to store. */
4367-static int
4368-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
4369- yytype_int16 *yyssp, int yytoken)
4370-{
4371- YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
4372- YYSIZE_T yysize = yysize0;
4373- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
4374- /* Internationalized format string. */
4375- const char *yyformat = YY_NULLPTR;
4376- /* Arguments of yyformat. */
4377- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
4378- /* Number of reported tokens (one for the "unexpected", one per
4379- "expected"). */
4380- int yycount = 0;
4381-
4382- /* There are many possibilities here to consider:
4383- - If this state is a consistent state with a default action, then
4384- the only way this function was invoked is if the default action
4385- is an error action. In that case, don't check for expected
4386- tokens because there are none.
4387- - The only way there can be no lookahead present (in yychar) is if
4388- this state is a consistent state with a default action. Thus,
4389- detecting the absence of a lookahead is sufficient to determine
4390- that there is no unexpected or expected token to report. In that
4391- case, just report a simple "syntax error".
4392- - Don't assume there isn't a lookahead just because this state is a
4393- consistent state with a default action. There might have been a
4394- previous inconsistent state, consistent state with a non-default
4395- action, or user semantic action that manipulated yychar.
4396- - Of course, the expected token list depends on states to have
4397- correct lookahead information, and it depends on the parser not
4398- to perform extra reductions after fetching a lookahead from the
4399- scanner and before detecting a syntax error. Thus, state merging
4400- (from LALR or IELR) and default reductions corrupt the expected
4401- token list. However, the list is correct for canonical LR with
4402- one exception: it will still contain any token that will not be
4403- accepted due to an error action in a later state.
4404- */
4405- if (yytoken != YYEMPTY)
4406- {
4407- int yyn = yypact[*yyssp];
4408- yyarg[yycount++] = yytname[yytoken];
4409- if (!yypact_value_is_default (yyn))
4410- {
4411- /* Start YYX at -YYN if negative to avoid negative indexes in
4412- YYCHECK. In other words, skip the first -YYN actions for
4413- this state because they are default actions. */
4414- int yyxbegin = yyn < 0 ? -yyn : 0;
4415- /* Stay within bounds of both yycheck and yytname. */
4416- int yychecklim = YYLAST - yyn + 1;
4417- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
4418- int yyx;
4419-
4420- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
4421- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
4422- && !yytable_value_is_error (yytable[yyx + yyn]))
4423- {
4424- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
4425- {
4426- yycount = 1;
4427- yysize = yysize0;
4428- break;
4429- }
4430- yyarg[yycount++] = yytname[yyx];
4431- {
4432- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
4433- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
4434- yysize = yysize1;
4435- else
4436- return 2;
4437- }
4438- }
4439- }
4440- }
4441-
4442- switch (yycount)
4443- {
4444-# define YYCASE_(N, S) \
4445- case N: \
4446- yyformat = S; \
4447- break
4448- default: /* Avoid compiler warnings. */
4449- YYCASE_(0, YY_("syntax error"));
4450- YYCASE_(1, YY_("syntax error, unexpected %s"));
4451- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
4452- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
4453- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
4454- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
4455-# undef YYCASE_
4456- }
4457
4458- {
4459- YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
4460- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
4461- yysize = yysize1;
4462- else
4463- return 2;
4464- }
4465-
4466- if (*yymsg_alloc < yysize)
4467- {
4468- *yymsg_alloc = 2 * yysize;
4469- if (! (yysize <= *yymsg_alloc
4470- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
4471- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
4472- return 1;
4473- }
4474-
4475- /* Avoid sprintf, as that infringes on the user's name space.
4476- Don't have undefined behavior even if the translation
4477- produced a string with the wrong number of "%s"s. */
4478- {
4479- char *yyp = *yymsg;
4480- int yyi = 0;
4481- while ((*yyp = *yyformat) != '\0')
4482- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
4483- {
4484- yyp += yytnamerr (yyp, yyarg[yyi++]);
4485- yyformat += 2;
4486- }
4487- else
4488- {
4489- yyp++;
4490- yyformat++;
4491- }
4492- }
4493- return 0;
4494-}
4495-#endif /* YYERROR_VERBOSE */
4496
4497 /*-----------------------------------------------.
4498 | Release the memory associated to this symbol. |
4499 `-----------------------------------------------*/
4500
4501 static void
4502-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, SEG *result)
4503+yydestruct (const char *yymsg,
4504+ yysymbol_kind_t yykind, YYSTYPE *yyvaluep, SEG *result)
4505 {
4506- YYUSE (yyvaluep);
4507- YYUSE (result);
4508+ YY_USE (yyvaluep);
4509+ YY_USE (result);
4510 if (!yymsg)
4511 yymsg = "Deleting";
4512- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4513+ YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
4514
4515 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
4516- YYUSE (yytype);
4517+ YY_USE (yykind);
4518 YY_IGNORE_MAYBE_UNINITIALIZED_END
4519 }
4520
4521
4522-
4523-
4524-/* The lookahead symbol. */
4525+/* Lookahead token kind. */
4526 int yychar;
4527
4528 /* The semantic value of the lookahead symbol. */
4529@@ -1007,6 +910,8 @@ YYSTYPE yylval;
4530 int yynerrs;
4531
4532
4533+
4534+
4535 /*----------.
4536 | yyparse. |
4537 `----------*/
4538@@ -1014,43 +919,36 @@ int yynerrs;
4539 int
4540 yyparse (SEG *result)
4541 {
4542- int yystate;
4543+ yy_state_fast_t yystate = 0;
4544 /* Number of tokens to shift before error messages enabled. */
4545- int yyerrstatus;
4546+ int yyerrstatus = 0;
4547
4548- /* The stacks and their tools:
4549- 'yyss': related to states.
4550- 'yyvs': related to semantic values.
4551-
4552- Refer to the stacks through separate pointers, to allow yyoverflow
4553+ /* Refer to the stacks through separate pointers, to allow yyoverflow
4554 to reallocate them elsewhere. */
4555
4556- /* The state stack. */
4557- yytype_int16 yyssa[YYINITDEPTH];
4558- yytype_int16 *yyss;
4559- yytype_int16 *yyssp;
4560+ /* Their size. */
4561+ YYPTRDIFF_T yystacksize = YYINITDEPTH;
4562
4563- /* The semantic value stack. */
4564- YYSTYPE yyvsa[YYINITDEPTH];
4565- YYSTYPE *yyvs;
4566- YYSTYPE *yyvsp;
4567+ /* The state stack: array, bottom, top. */
4568+ yy_state_t yyssa[YYINITDEPTH];
4569+ yy_state_t *yyss = yyssa;
4570+ yy_state_t *yyssp = yyss;
4571
4572- YYSIZE_T yystacksize;
4573+ /* The semantic value stack: array, bottom, top. */
4574+ YYSTYPE yyvsa[YYINITDEPTH];
4575+ YYSTYPE *yyvs = yyvsa;
4576+ YYSTYPE *yyvsp = yyvs;
4577
4578 int yyn;
4579+ /* The return value of yyparse. */
4580 int yyresult;
4581- /* Lookahead token as an internal (translated) token number. */
4582- int yytoken = 0;
4583+ /* Lookahead symbol kind. */
4584+ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
4585 /* The variables used to return semantic value and location from the
4586 action routines. */
4587 YYSTYPE yyval;
4588
4589-#if YYERROR_VERBOSE
4590- /* Buffer for error messages, and its allocated size. */
4591- char yymsgbuf[128];
4592- char *yymsg = yymsgbuf;
4593- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4594-#endif
4595+
4596
4597 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4598
4599@@ -1058,15 +956,8 @@ yyparse (SEG *result)
4600 Keep to zero when no symbol should be popped. */
4601 int yylen = 0;
4602
4603- yyssp = yyss = yyssa;
4604- yyvsp = yyvs = yyvsa;
4605- yystacksize = YYINITDEPTH;
4606-
4607 YYDPRINTF ((stderr, "Starting parse\n"));
4608
4609- yystate = 0;
4610- yyerrstatus = 0;
4611- yynerrs = 0;
4612 yychar = YYEMPTY; /* Cause a token to be read. */
4613 goto yysetstate;
4614
4615@@ -1081,10 +972,15 @@ yynewstate:
4616
4617
4618 /*--------------------------------------------------------------------.
4619-| yynewstate -- set current state (the top of the stack) to yystate. |
4620+| yysetstate -- set current state (the top of the stack) to yystate. |
4621 `--------------------------------------------------------------------*/
4622 yysetstate:
4623- *yyssp = (yytype_int16) yystate;
4624+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4625+ YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
4626+ YY_IGNORE_USELESS_CAST_BEGIN
4627+ *yyssp = YY_CAST (yy_state_t, yystate);
4628+ YY_IGNORE_USELESS_CAST_END
4629+ YY_STACK_PRINT (yyss, yyssp);
4630
4631 if (yyss + yystacksize - 1 <= yyssp)
4632 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
4633@@ -1092,23 +988,23 @@ yysetstate:
4634 #else
4635 {
4636 /* Get the current used size of the three stacks, in elements. */
4637- YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
4638+ YYPTRDIFF_T yysize = yyssp - yyss + 1;
4639
4640 # if defined yyoverflow
4641 {
4642 /* Give user a chance to reallocate the stack. Use copies of
4643 these so that the &'s don't force the real ones into
4644 memory. */
4645+ yy_state_t *yyss1 = yyss;
4646 YYSTYPE *yyvs1 = yyvs;
4647- yytype_int16 *yyss1 = yyss;
4648
4649 /* Each stack pointer address is followed by the size of the
4650 data in use in that stack, in bytes. This used to be a
4651 conditional around just the two extra args, but that might
4652 be undefined if yyoverflow is a macro. */
4653 yyoverflow (YY_("memory exhausted"),
4654- &yyss1, yysize * sizeof (*yyssp),
4655- &yyvs1, yysize * sizeof (*yyvsp),
4656+ &yyss1, yysize * YYSIZEOF (*yyssp),
4657+ &yyvs1, yysize * YYSIZEOF (*yyvsp),
4658 &yystacksize);
4659 yyss = yyss1;
4660 yyvs = yyvs1;
4661@@ -1122,14 +1018,15 @@ yysetstate:
4662 yystacksize = YYMAXDEPTH;
4663
4664 {
4665- yytype_int16 *yyss1 = yyss;
4666+ yy_state_t *yyss1 = yyss;
4667 union yyalloc *yyptr =
4668- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4669+ YY_CAST (union yyalloc *,
4670+ YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
4671 if (! yyptr)
4672 goto yyexhaustedlab;
4673 YYSTACK_RELOCATE (yyss_alloc, yyss);
4674 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4675-# undef YYSTACK_RELOCATE
4676+# undef YYSTACK_RELOCATE
4677 if (yyss1 != yyssa)
4678 YYSTACK_FREE (yyss1);
4679 }
4680@@ -1138,16 +1035,16 @@ yysetstate:
4681 yyssp = yyss + yysize - 1;
4682 yyvsp = yyvs + yysize - 1;
4683
4684- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4685- (unsigned long) yystacksize));
4686+ YY_IGNORE_USELESS_CAST_BEGIN
4687+ YYDPRINTF ((stderr, "Stack size increased to %ld\n",
4688+ YY_CAST (long, yystacksize)));
4689+ YY_IGNORE_USELESS_CAST_END
4690
4691 if (yyss + yystacksize - 1 <= yyssp)
4692 YYABORT;
4693 }
4694 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
4695
4696- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4697-
4698 if (yystate == YYFINAL)
4699 YYACCEPT;
4700
4701@@ -1168,18 +1065,29 @@ yybackup:
4702
4703 /* Not known => get a lookahead token if don't already have one. */
4704
4705- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4706+ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
4707 if (yychar == YYEMPTY)
4708 {
4709- YYDPRINTF ((stderr, "Reading a token: "));
4710+ YYDPRINTF ((stderr, "Reading a token\n"));
4711 yychar = yylex ();
4712 }
4713
4714 if (yychar <= YYEOF)
4715 {
4716- yychar = yytoken = YYEOF;
4717+ yychar = YYEOF;
4718+ yytoken = YYSYMBOL_YYEOF;
4719 YYDPRINTF ((stderr, "Now at end of input.\n"));
4720 }
4721+ else if (yychar == YYerror)
4722+ {
4723+ /* The scanner already issued an error message, process directly
4724+ to error recovery. But do not keep the error token as
4725+ lookahead, it is too special and may lead us to an endless
4726+ loop in error recovery. */
4727+ yychar = YYUNDEF;
4728+ yytoken = YYSYMBOL_YYerror;
4729+ goto yyerrlab1;
4730+ }
4731 else
4732 {
4733 yytoken = YYTRANSLATE (yychar);
4734@@ -1207,15 +1115,13 @@ yybackup:
4735
4736 /* Shift the lookahead token. */
4737 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4738-
4739- /* Discard the shifted token. */
4740- yychar = YYEMPTY;
4741-
4742 yystate = yyn;
4743 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
4744 *++yyvsp = yylval;
4745 YY_IGNORE_MAYBE_UNINITIALIZED_END
4746
4747+ /* Discard the shifted token. */
4748+ yychar = YYEMPTY;
4749 goto yynewstate;
4750
4751
4752@@ -1250,9 +1156,9 @@ yyreduce:
4753 YY_REDUCE_PRINT (yyn);
4754 switch (yyn)
4755 {
4756- case 2:
4757-#line 62 "segparse.y" /* yacc.c:1652 */
4758- {
4759+ case 2: /* range: boundary PLUMIN deviation */
4760+#line 62 "segparse.y"
4761+ {
4762 result->lower = (yyvsp[-2].bnd).val - (yyvsp[0].bnd).val;
4763 result->upper = (yyvsp[-2].bnd).val + (yyvsp[0].bnd).val;
4764 sprintf(strbuf, "%g", result->lower);
4765@@ -1262,12 +1168,12 @@ yyreduce:
4766 result->l_ext = '\0';
4767 result->u_ext = '\0';
4768 }
4769-#line 1266 "segparse.c" /* yacc.c:1652 */
4770+#line 1172 "segparse.c"
4771 break;
4772
4773- case 3:
4774-#line 74 "segparse.y" /* yacc.c:1652 */
4775- {
4776+ case 3: /* range: boundary RANGE boundary */
4777+#line 74 "segparse.y"
4778+ {
4779 result->lower = (yyvsp[-2].bnd).val;
4780 result->upper = (yyvsp[0].bnd).val;
4781 if ( result->lower > result->upper ) {
4782@@ -1283,12 +1189,12 @@ yyreduce:
4783 result->l_ext = ( (yyvsp[-2].bnd).ext ? (yyvsp[-2].bnd).ext : '\0' );
4784 result->u_ext = ( (yyvsp[0].bnd).ext ? (yyvsp[0].bnd).ext : '\0' );
4785 }
4786-#line 1287 "segparse.c" /* yacc.c:1652 */
4787+#line 1193 "segparse.c"
4788 break;
4789
4790- case 4:
4791-#line 92 "segparse.y" /* yacc.c:1652 */
4792- {
4793+ case 4: /* range: boundary RANGE */
4794+#line 92 "segparse.y"
4795+ {
4796 result->lower = (yyvsp[-1].bnd).val;
4797 result->upper = HUGE_VAL;
4798 result->l_sigd = (yyvsp[-1].bnd).sigd;
4799@@ -1296,12 +1202,12 @@ yyreduce:
4800 result->l_ext = ( (yyvsp[-1].bnd).ext ? (yyvsp[-1].bnd).ext : '\0' );
4801 result->u_ext = '-';
4802 }
4803-#line 1300 "segparse.c" /* yacc.c:1652 */
4804+#line 1206 "segparse.c"
4805 break;
4806
4807- case 5:
4808-#line 102 "segparse.y" /* yacc.c:1652 */
4809- {
4810+ case 5: /* range: RANGE boundary */
4811+#line 102 "segparse.y"
4812+ {
4813 result->lower = -HUGE_VAL;
4814 result->upper = (yyvsp[0].bnd).val;
4815 result->l_sigd = 0;
4816@@ -1309,22 +1215,22 @@ yyreduce:
4817 result->l_ext = '-';
4818 result->u_ext = ( (yyvsp[0].bnd).ext ? (yyvsp[0].bnd).ext : '\0' );
4819 }
4820-#line 1313 "segparse.c" /* yacc.c:1652 */
4821+#line 1219 "segparse.c"
4822 break;
4823
4824- case 6:
4825-#line 112 "segparse.y" /* yacc.c:1652 */
4826- {
4827+ case 6: /* range: boundary */
4828+#line 112 "segparse.y"
4829+ {
4830 result->lower = result->upper = (yyvsp[0].bnd).val;
4831 result->l_sigd = result->u_sigd = (yyvsp[0].bnd).sigd;
4832 result->l_ext = result->u_ext = ( (yyvsp[0].bnd).ext ? (yyvsp[0].bnd).ext : '\0' );
4833 }
4834-#line 1323 "segparse.c" /* yacc.c:1652 */
4835+#line 1229 "segparse.c"
4836 break;
4837
4838- case 7:
4839-#line 120 "segparse.y" /* yacc.c:1652 */
4840- {
4841+ case 7: /* boundary: SEGFLOAT */
4842+#line 120 "segparse.y"
4843+ {
4844 /* temp variable avoids a gcc 3.3.x bug on Sparc64 */
4845 float val = seg_atof((yyvsp[0].text));
4846
4847@@ -1332,12 +1238,12 @@ yyreduce:
4848 (yyval.bnd).sigd = significant_digits((yyvsp[0].text));
4849 (yyval.bnd).val = val;
4850 }
4851-#line 1336 "segparse.c" /* yacc.c:1652 */
4852+#line 1242 "segparse.c"
4853 break;
4854
4855- case 8:
4856-#line 129 "segparse.y" /* yacc.c:1652 */
4857- {
4858+ case 8: /* boundary: EXTENSION SEGFLOAT */
4859+#line 129 "segparse.y"
4860+ {
4861 /* temp variable avoids a gcc 3.3.x bug on Sparc64 */
4862 float val = seg_atof((yyvsp[0].text));
4863
4864@@ -1345,12 +1251,12 @@ yyreduce:
4865 (yyval.bnd).sigd = significant_digits((yyvsp[0].text));
4866 (yyval.bnd).val = val;
4867 }
4868-#line 1349 "segparse.c" /* yacc.c:1652 */
4869+#line 1255 "segparse.c"
4870 break;
4871
4872- case 9:
4873-#line 140 "segparse.y" /* yacc.c:1652 */
4874- {
4875+ case 9: /* deviation: SEGFLOAT */
4876+#line 140 "segparse.y"
4877+ {
4878 /* temp variable avoids a gcc 3.3.x bug on Sparc64 */
4879 float val = seg_atof((yyvsp[0].text));
4880
4881@@ -1358,11 +1264,12 @@ yyreduce:
4882 (yyval.bnd).sigd = significant_digits((yyvsp[0].text));
4883 (yyval.bnd).val = val;
4884 }
4885-#line 1362 "segparse.c" /* yacc.c:1652 */
4886+#line 1268 "segparse.c"
4887 break;
4888
4889
4890-#line 1366 "segparse.c" /* yacc.c:1652 */
4891+#line 1272 "segparse.c"
4892+
4893 default: break;
4894 }
4895 /* User semantic actions sometimes alter yychar, and that requires
4896@@ -1376,11 +1283,10 @@ yyreduce:
4897 case of YYERROR or YYBACKUP, subsequent parser actions might lead
4898 to an incorrect destructor call or verbose syntax error message
4899 before the lookahead is translated. */
4900- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4901+ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
4902
4903 YYPOPSTACK (yylen);
4904 yylen = 0;
4905- YY_STACK_PRINT (yyss, yyssp);
4906
4907 *++yyvsp = yyval;
4908
4909@@ -1404,50 +1310,14 @@ yyreduce:
4910 yyerrlab:
4911 /* Make sure we have latest lookahead translation. See comments at
4912 user semantic actions for why this is necessary. */
4913- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
4914-
4915+ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
4916 /* If not already recovering from an error, report this error. */
4917 if (!yyerrstatus)
4918 {
4919 ++yynerrs;
4920-#if ! YYERROR_VERBOSE
4921 yyerror (result, YY_("syntax error"));
4922-#else
4923-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
4924- yyssp, yytoken)
4925- {
4926- char const *yymsgp = YY_("syntax error");
4927- int yysyntax_error_status;
4928- yysyntax_error_status = YYSYNTAX_ERROR;
4929- if (yysyntax_error_status == 0)
4930- yymsgp = yymsg;
4931- else if (yysyntax_error_status == 1)
4932- {
4933- if (yymsg != yymsgbuf)
4934- YYSTACK_FREE (yymsg);
4935- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
4936- if (!yymsg)
4937- {
4938- yymsg = yymsgbuf;
4939- yymsg_alloc = sizeof yymsgbuf;
4940- yysyntax_error_status = 2;
4941- }
4942- else
4943- {
4944- yysyntax_error_status = YYSYNTAX_ERROR;
4945- yymsgp = yymsg;
4946- }
4947- }
4948- yyerror (result, yymsgp);
4949- if (yysyntax_error_status == 2)
4950- goto yyexhaustedlab;
4951- }
4952-# undef YYSYNTAX_ERROR
4953-#endif
4954 }
4955
4956-
4957-
4958 if (yyerrstatus == 3)
4959 {
4960 /* If just tried and failed to reuse lookahead token after an
4961@@ -1496,13 +1366,14 @@ yyerrorlab:
4962 yyerrlab1:
4963 yyerrstatus = 3; /* Each real token shifted decrements this. */
4964
4965+ /* Pop stack until we find a state that shifts the error token. */
4966 for (;;)
4967 {
4968 yyn = yypact[yystate];
4969 if (!yypact_value_is_default (yyn))
4970 {
4971- yyn += YYTERROR;
4972- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4973+ yyn += YYSYMBOL_YYerror;
4974+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
4975 {
4976 yyn = yytable[yyn];
4977 if (0 < yyn)
4978@@ -1516,7 +1387,7 @@ yyerrlab1:
4979
4980
4981 yydestruct ("Error: popping",
4982- yystos[yystate], yyvsp, result);
4983+ YY_ACCESSING_SYMBOL (yystate), yyvsp, result);
4984 YYPOPSTACK (1);
4985 yystate = *yyssp;
4986 YY_STACK_PRINT (yyss, yyssp);
4987@@ -1528,7 +1399,7 @@ yyerrlab1:
4988
4989
4990 /* Shift the error token. */
4991- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4992+ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
4993
4994 yystate = yyn;
4995 goto yynewstate;
4996@@ -1550,20 +1421,20 @@ yyabortlab:
4997 goto yyreturn;
4998
4999
5000-#if !defined yyoverflow || YYERROR_VERBOSE
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches